Java Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming LanguagesJava Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old June 12th, 2002, 08:24 PM
waxixi waxixi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 16 waxixi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 21 m 31 sec
Reputation Power: 0
Unhappy difference between “” and ""

The data file (*.txt) I tried to bulkload into MySQL database
contains some “” instead of "" in the strings. When I tried to show those as links on JSP, I found that they changed into question mark '?'. And when I click the links, I want to call another JSP to show the contents related to the strings. And of course in this case the search failed. MySQL does not support “”, right?

Can anyone help me out? Thank you very much!

Reply With Quote
  #2  
Old June 13th, 2002, 10:29 AM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
My first guess would be that the hex code for that character is being interpreted different by the different parsers. Browsers and Java use unicode as far as I know, but what about mysql? What character is the correct one? It is highly possible that mysql is indeed changing the character into something it thinks it should be. In the end, none of what we type is really characters at all, it is only hex values that something must then convert into characters.

Reply With Quote
  #3  
Old June 13th, 2002, 06:14 PM
waxixi waxixi is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2002
Posts: 16 waxixi User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 21 m 31 sec
Reputation Power: 0
Thank you very much! When I checked it in MySQ and also read it under Unix system, I found that all “” turned into ô, and some of dash - turned into û.

Can we configure MySQL to accept those characters, or we need to convert all “” into "" before loading the data file into MySQL?

Thanks a lot.

Reply With Quote
  #4  
Old June 13th, 2002, 10:53 PM
Nemi Nemi is offline
Clueless llama
Dev Shed Regular (2000 - 2499 posts)
 
Join Date: Feb 2001
Location: Lincoln, NE. USA
Posts: 2,353 Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level)Nemi User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 2 Days 12 h 35 m 19 sec
Reputation Power: 111
If it is indeed supposed to be a double quote, I would convert it to that I guess. I do not know what kind of data you are using, so it is hard to say how critical that would be. Regardless of what it is, make sure and encode it if you are using it in a url.

http://java.sun.com/j2se/1.4/docs/a...URLEncoder.html

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesJava Help > difference between “” and ""


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway