Page 1 of 1

How to know when to post Unicode or Ansi data?

Posted: Wed 12 May 2010 15:15
by upscene
Hi,

Given the following table:

Code: Select all

CREATE TABLE test_table (
  I         Integer(11),
  txt       Text CHARACTER SET utf8 COLLATE utf8_general_ci,
  txt_ascii Text CHARACTER SET latin1 COLLATE latin1_swedish_ci, 
  PRIMARY KEY (
      i
  )
) ENGINE=MyISAM ROW_FORMAT=dynamic DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
How do I know when unicode data is accepted when editing a grid?

If I set UseUnicode to True in the connection component, both of the Text columns come back as WideMemo, if I do not, both seem to come back as Memo.

Got a clue?

With regards,

Martijn Tonies
Upscene Productions

Posted: Thu 13 May 2010 08:14
by Dimon
The point is that on connection establishment MySQL server requires specifying of character set, and after this all data is encoded to this charset by MySQL sever. Therefore we don't notice differences between the txt and txt_ascii fields, because MySQL server returns the same field description for both these fields.

Posted: Thu 13 May 2010 09:19
by upscene
Dimon wrote:The point is that on connection establishment MySQL server requires specifying of character set, and after this all data is encoded to this charset by MySQL sever. Therefore we don't notice differences between the txt and txt_ascii fields, because MySQL server returns the same field description for both these fields.
So, you would say: let the user decide?

Posted: Thu 13 May 2010 09:45
by Dimon
Yes, it is correct.