Can the French and Spanish special chars be held in a varchar?

后端 未结 5 707
长发绾君心
长发绾君心 2021-02-14 05:01

French and Spanish have special chars in them that are not used in normal English (accented vowels and such).

Are those chars supported in a varchar? Or do I need a nva

5条回答
  •  闹比i
    闹比i (楼主)
    2021-02-14 05:37

    Some excellent information, particularly from Nicholas Carey, but nobody directly gave a yes/no answer to your question...

    Yes, you can use varchar to handle a mix of French and Spanish, providing your character set is Windows-1252 (or a similar modern superset of ISO-8859-1 with a few extra characters like the Euro symbol). In SQL Server, the character set is chosen by setting the collation (server-wide, per database or per column): Windows-1252 is used by the *Latin1* collations. In MySQL, Windows-1252 is called Latin1.

    Note that if you try to store a character outside the repertoire of the chosen character set, the system may throw an error, or silently munge the character into a similar one from its repertoire. E.g. SQL Server will munge a Polish Ł to a simple L, but throw an error for a Japanese character.

提交回复
热议问题