Author Topic: autorevision.cpp shouldn't use en_US profile  (Read 6525 times)

skoehler

  • Guest
autorevision.cpp shouldn't use en_US profile
« on: November 11, 2006, 02:18:50 am »
Hi,

The file "src/build_tools/autorevision/autorevision.cpp" contains the line:
  set_env("LANG", "en_US");

Please replace it by:
  set_env("LANG", "C");

Does autorevision.cpp also take care of the case, that some LC_* variables may be set?

Why you shouldn't use the en_US profile? For example on my GentooLinux, the en_* profiles are not available. I only bild the de_* profiles when compiling glibc. But "C" profile is always available!

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7785
    • My Best Post
Re: autorevision.cpp shouldn't use en_US profile
« Reply #1 on: November 11, 2006, 03:29:54 am »
Look at this thread http://forums.codeblocks.org/index.php?topic=4302.0

It may help you understand the issue, I can't follow the problem myself.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: autorevision.cpp shouldn't use en_US profile
« Reply #2 on: November 11, 2006, 12:51:10 pm »
This entire topic is obsolete now, as autorevision will demand svn to use XML output in the future (the downside is that you will no longer be able to use Subversion 1.2 or 1.1).

However, even before that, it should not matter what languages you or anybody else have installed ony our system. Nobody wants to know. Nobody wants to use them, it has to work anyway.
The issues that existed with autorevision are the very fact that people have certain localisations on their system, for example German or French. That means that Subversion will output something like "Letztes Änderungsdatum" or "Date de la dernière modifciation" or some other bullshit which is impossible to parse. There was no way to get an output that you could parse in a reliable way.

I even intended to use something like "jfwlyidlkjfg" as the locale setting, but Lieven changed it to "en_US" due to demand by a few people who saw errors/warnings (not all systems handle the fallback alike  :?).
Any setting is OK as long as it defaults to the language that is built into the Subversion executable, not some arbitrary localisation (an invalid localisation normally defaults to the string built into the executable, but some systems emit a warning). en_US is what seems to be Subversion's builtin language, so that is what was chosen.
« Last Edit: November 11, 2006, 12:53:43 pm by thomas »
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline afb

  • Developer
  • Lives here!
  • *****
  • Posts: 884
Re: autorevision.cpp shouldn't use en_US profile
« Reply #3 on: November 11, 2006, 02:44:41 pm »
A simple hack meanwhile is:

Code
#ifdef __WIN32__
    set_env("LANG", "en_US");
#else
    set_env("LANG", "C");
#endif

skoehler

  • Guest
Re: autorevision.cpp shouldn't use en_US profile
« Reply #4 on: November 12, 2006, 08:54:28 pm »
Hmm, has this hack been applied already?

I can't find some SVN-webacces so i could check.

Offline artoj

  • Almost regular
  • **
  • Posts: 206
  • Location: Supporting my team
    • http://ajonsson.kapsi.fi/
Re: autorevision.cpp shouldn't use en_US profile
« Reply #5 on: November 12, 2006, 09:08:50 pm »