• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 413
  • Last Modified:

Degrees symbol not translating correctly ( ý ??? ) when inserting into database!!

I've built a custom app for a client that has product import/export features.  The client can export a tab-delimited text file, .. import the file into excel, ... make changes, .. re-save, ... and then re-import the file into the database.

I am first retrieving the data from the uploaded tab-delimited text file using CFHTTP:

<CFHTTP URL="http://ww.mywebsiteurl.com/uploads/#FORM.the_filename#" METHOD="GET" NAME="MyQuery" DELIMITER="      " TEXTQUALIFIER=""></CFHTTP>

I then either insert a new record, or update an existing one, .. depending on whether or not the specfic product code already exists in the database.  

The problem that I'm having is that whenever the client includes the degrees symbol ( ie: ° ) in the file to be re-imported, .. the symbol is for whatever reason being converted to some other character ( ie: ý ) .  

Why is this happening, and how can it be corrected?  I suspect that the problem is with CFHTTP's inability to properly decipher the degrees symbol using the GET method, since I have a simple "modify products" section in the app's  adminsitration website which retains the degrees symbol without any problems when I modify a product description.  But I'm not sure how to confirm this just yet.  Anyone know what might be going on?

Thanks in advance,
 - yvan

0
IDEASDesign
Asked:
IDEASDesign
  • 3
  • 3
1 Solution
 
black0psCommented:
Do you have the ability to make modify the text file before cfhttp gets it? If you can, try and parse the file and do a replace for that degree symbol. Replace it with either &deg; or %C2%B0. I have problems with characters when the charset isn't encoded properly. You might want to try UTF-8 or ISO. (switch it up)

-- Ian
0
 
IDEASDesignAuthor Commented:
Actually, I was able to resolve the problem by adding  charset="iso-8859-1" to the CFHTTP tag.  I'd already tried the approach you suggested (thank you) - but as it turned out, it was an issue relating to the character encoding.

- yvan



0
 
IDEASDesignAuthor Commented:
How do I delete this question, considering that I've already found a solution on my own?

- yvan

0
The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

 
black0psCommented:
Make a post in the help forum with a link to this topic.
0
 
IDEASDesignAuthor Commented:
Okay.  And where exactly is the "help" forum?

- yvan
0
 
LunchyCommented:
Closed, 125 points refunded.
Lunchy
Friendly Neighbourhood Community Support Admin
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now