Comment by SigmundA
11 hours ago
Vast majority of text fields I see are coded values that are perfectly fine using ascii, but I deal mostly with English language systems.
Text fields that users can type into directly especially multiline tend to need unicode but they are far fewer.
Some examples of coded fields that may be known to be ascii: order name, department code, business title, cost center, location id, preferred language, account type…
English has plenty of Unicode — claiming otherwise is such a cliché…
Unicode is a requirement everywhere human language is used, from Earth to the Boöotes Void.
Just to be pedantic, those characters are in 'ANSI'/CP1252 and would be fine in a varchar on many systems.
Not that I disagree — Win32/C#/Java/etc have 16-bit characters, your entire system is already 'paying the price', so weird to get frugal here.
My comment contains two glyphs that are not in CP1252.
> Unicode is a requirement everywhere human language is used
Strange then how it was not a requirement for many, many years.
Also less awkward to make it right the first time, instead of explaining why someone can’t type their name or an emoji
Specifically not talking about a name field
I am talking about coded values, like Status = 'A', 'B' or 'C'
Taking double the space for this stuff is a waste of resources and nobody usually cares about extended characters here in English language systems at least they just want something more readable than integers when querying and debugging the data. End users will see longer descriptions joined from code tables or from app caches which can have unicode.
It's way better to just use a DBMS that supports enums. I know SQL server isn't one of those but I still don't store my coded values as strings.
Those are all single byte characters in UTF-8.
2 replies →