The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,466 other followers

Interesting SO question: What are the experiences with using unicode in identifiers?

Posted by jpluimers on 2013/10/29

Toon Krijthe posted an interesting question to SO.

Though 5 years old, I think it stilll is very valid one:

At my work, we have decided to stay with the ANSI characters for identifiers. Is there anybody out there using unicode identifiers and what are the experiences?

For all projects I work on (in various Languages like  English, German, Dutch or other), I stick to ASCII characters (not even ANSI) for:

  • file names
  • identifiers

I also try to abstract the non-ASCII strings into places where I am sure that the encoding is preserved (for text files, I prefer UTF-8), or where these characters are properly escaped.

What is your take on this?


via: uniqueidentifier – What are the experiences with using unicode in identifiers – Stack Overflow.

4 Responses to “Interesting SO question: What are the experiences with using unicode in identifiers?”

  1. Leonardo Herrera said

    I’m a spanish-speaking developer and I also stick with ANSI for everything that’s not meant to be read by final users.

    (I was really surprised when I created a button and entered “Acción” in its name instead of its caption, and it worked just fine.)

  2. Anders Andersen said

    I have used it a bit (in D2009 and XE3), but as we all know, the Delphi IDE is buggy as hell and it can completely choke on non-ascii identifiers, so sometimes you will not get the result you are looking for and will have to use ascii characters instead. I wouldn’t use it in D2009. In XE3 it seems a bit safer.

    I don’t think there is any reason why you should have an absolute rule to only use ascii characters in identifiers. If you have a regionally restricted application it makes sense to use identifiers in the language of the region your application is targeted at and developed in.

  3. abouchez said

    English everywhere within identifiers, code and database layout.

    Local language is a wrong idea: if you want e.g. to outsource some development, every coder would understand English identifiers.

    In some legacy applications (not written by me), we have French column names or class/file names. It made sense at those time, but now the company has be bought several times (up to be part of a billion dollar company), and all this legacy code is not shareable any more.

    When working with JSON or XML, it is also much easier to work with, and reduce bandwidth when you use UTF-8 encoding (e.g. over the Internet).

  4. Dennis said

    We use ASCII only, too. This ensures all external tools well work as well.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: