If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Character set configuration in MySQL connection URL?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-01-07, 08:03
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Character set configuration in MySQL connection URL?

Hi,

I connect to my MySQL server using the mysql-connector-java-3.0.16-ga-bin.jar driver jars with the following connection URL,

jdbc:mysql://<HOST>:<PORT>/<DB>

while inserting a table column of Varchar(50) type with a value of
Code:
'&#195;˜nrew'
, but i find the value inserted is
Code:
'&#195;?nrew'
. It seems the default character set does not include the " ˜ " character.

could anyone let me know how to set a character set in MySQL connection URL.,

Thanks ,
Shefu

Last edited by Shefu; 05-01-07 at 08:11.
Reply With Quote
  #2 (permalink)  
Old 05-02-07, 08:16
aschk aschk is offline
Registered User
 
Join Date: Mar 2007
Location: 636f6d7075746572
Posts: 770
You cannot set the character set in the connection itself. The character set has to be set in the DB (either by table or column in table)
Reply With Quote
  #3 (permalink)  
Old 05-03-07, 01:59
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
Thanks for the reply aschk, the problem is whenever I try to insert the string ''&#195;˜nrew'' to my varchar field, it is inserted as ''&#195;?nrew''.

Does it means that the character set used in MySQL (the default Latin1 is used) not supports the character ''˜'' ? or

the JDBC driver does not understand the above character and replaces it with the symbol '?' ?

Kindly suggest me how to insert the above character..

Sn

Last edited by Shefu; 05-03-07 at 02:30.
Reply With Quote
  #4 (permalink)  
Old 05-03-07, 04:21
Shefu Shefu is offline
Registered User
 
Join Date: Apr 2005
Posts: 127
How to query the character set used in the MySQL?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On