• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Unicode with MySQL

 
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all ,
I have some problems with unicode . I'm using MySQL 4.1 , JDK 5.0 . With the same script to create database , same code to insert data into database , but in my home , when I inserted data into database , it inserted like : Nguyễn Văn , in another computer in my friend's home , it inserted like : Nguy��?n V�?n . I cant understand . Do you know this problems ?
 
Ranch Hand
Posts: 442
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Anh Vu:
Hi all ,
I have some problems with unicode . I'm using MySQL 4.1 , JDK 5.0 . With the same script to create database , same code to insert data into database , but in my home , when I inserted data into database , it inserted like : Nguyễn Văn , in another computer in my friend's home , it inserted like : Nguy��?n V�?n . I cant understand . Do you know this problems ?



I know you said that it inserted those values but start at the beginning where the data is read from the file or manipulated as String objects.
The operating system's default charset is used unless you specify one, ie new String(someByteArray, "ISO-8859-1") or someString.getBytes("ISO-8859-1")

I found this article very helpful
 
reply
    Bookmark Topic Watch Topic
  • New Topic