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

Re: [TSVN] Problem with source encoding in TortoiseSVN 1.2

From: Norbert Unterberg <nunterberg_at_gmail.com>
Date: 2005-06-16 12:00:07 CEST

2005/6/14, SteveKing <steveking@gmx.ch>:

> >>TortoiseSVN 1.2 presumes a different encoding than what I expect about
> >>the source and things like merge and diff do not work correctly.
>
> Should be fixed in revision 3696.

I have just looked at your fix, and it might not be complete.
When I added the locale switching in TortoiseProc (see r3391), I used this code:

        setlocale(LC_CTYPE, "");
        _setmbcp(_MB_CP_LOCALE);

Using setlocale(LC_ALL, "") can have unexpected side effects, like
printf/scanf using locale settings for floating point etc. Setting the
locale for LC_CTYPE switches the locale only for character encodings.
And the _setmbcp() call sets the locale for the rmultibyte character
i/o functions.

setlocale(LC_CTYPE) affects the string functions
_setmbcp() affects file I/O in text mode
SetThreadLocale() affects the CStringW / CStringA conversion

So these three should match.

Norbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Jun 16 12:01:34 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.