Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how abt using UTF-8 for 8 bit US ASCII instead of ISO-8859-1 ?

 
steve mcdonald
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How abt using UTF-8 for 8 bit US ASCII instead of ISO-8859-1 (as suggested in some of the other threads) ?

The 8-bit, byte-oriented form, UTF-8, has been designed
for ease of use with existing ASCII-based systems.
 
Lara McCarver
Ranch Hand
Posts: 118
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem with UTF8 is, if someone in Japan starts using your program and entering Japanese characters, UTF8 will translate them to more than 1 byte each. Many characters will be 2 bytes long, but some (spaces, etc.) will be only 1 character. This might break your program because the database has fixed-width fields. What if that width is big enough to hold 34 1/2 characters for a particular company name? If you only save the 1st byte of a multi-byte character, you end up with a corrupted character. Also, it becomes more challenging to tell whether the text the user entered is too long for the field, and if it is too long, it is harder to report what the violation is, since the number of valid characters that can be entered depends on what alphabet is being used. The ISO choice is safer because each character is 1 byte each.

Lara
[ November 22, 2005: Message edited by: Lara McCarver ]
 
steve mcdonald
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks, will use ISO-8859-1 to be on the safer side.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic