[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[TSVN] TortoiseSVN codepage considerations (was: blame won't work)

From: Norbert Unterberg <nepo_at_gmx.net>
Date: 2005-05-18 21:44:28 CEST

SteveKing schrieb:

>>please try attached patch. It plays around with the thread locales [...]
>>
I wonder what TortoiseProc currently does with the thread locale. It
sets the locale to 1033 (english u.s.) at the beginning of InitInstance,
but then sets it again when it finds a matching language resource DLL,
correct?

The problem with this is that the current thread locale might not only
select the language (when using multi-language resources). It also
dictates the code page used for the CStringA/CStringW conversion which
is frequently used in the application. Was that intentional? If not, how
about not setting the thread locale at all? In addition, you might
concider to call at least setlocale(LC_CTYPE, "") there, to set the
runtime library to the correct encoding. I think setting the thread
locale was the inital cause for blame to fail on asian languages,
because this caused asian multibyte characters to be falsly interpreted
in the western ansi code page.

I do not dare to create a patch changing this because the locale might
affect some other library and windows API functions, and do not know if
you rely on a specific code page and the default C locale at other
places throughout the code.

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Wed May 18 21:45:06 2005

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.