Re: [fossil-users] Bug: non-ASCII user names are corrupted

2012-02-16 Thread Роман Донченко
Richard Hipp d...@sqlite.org писал в своём  
письме Thu, 16 Feb 2012 05:09:34 +0400:



2012/2/15 Richard Hipp d...@sqlite.org



2012/2/15 Роман Донченко  
dxdra...@yandex.ru



Hello,

I'm using (well, trying to) Fossil on Windows. My username is Роман.
This happens:

F:\Sourcefossil init test.sqlite
project-id: c162b4ff218ffca0d4f3fe26f20a34**fd5c7cf892
server-id:  01814b880714e63786ef5af7b403f5**bb4fbee016
admin-user: ? (initial password is 5c1309)

Note the five question marks.

I've examined the DB, and it seems that the actual value recorded is  
just

five of U+FFFD REPLACEMENT CHARACTER.



Are you able to compile Fossil from sources?  Can you try out the
following patch and let me know if it clears your problem?



I'm reasonably confident that the patch below will work, so I went ahead
and implemented it for every use of getenv() in Fossil.  The checkin is
here:  http://www.fossil-scm.org/fossil/ci/57152086b8?sbs=1

Users of Fossil with non-latin character sets on Windows:  Please check  
out

this change for me and let me know if it is working for you.  Thanks.


This does seem to fix it. Thanks for the prompt response.

Roman.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


[fossil-users] Bug: non-ASCII user names are corrupted

2012-02-15 Thread Роман Донченко

Hello,

I'm using (well, trying to) Fossil on Windows. My username is Роман.
This happens:

F:\Sourcefossil init test.sqlite
project-id: c162b4ff218ffca0d4f3fe26f20a34fd5c7cf892
server-id:  01814b880714e63786ef5af7b403f5bb4fbee016
admin-user: ? (initial password is 5c1309)

Note the five question marks.

I've examined the DB, and it seems that the actual value recorded is just
five of U+FFFD REPLACEMENT CHARACTER.

Regards,
Roman.

___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Bug: non-ASCII user names are corrupted

2012-02-15 Thread Leo Razoumov
2012/2/15 Роман Донченко dxdra...@yandex.ru:
 Hello,

 I'm using (well, trying to) Fossil on Windows. My username is Роман.
 This happens:

 F:\Sourcefossil init test.sqlite
 project-id: c162b4ff218ffca0d4f3fe26f20a34fd5c7cf892
 server-id:  01814b880714e63786ef5af7b403f5bb4fbee016
 admin-user: ? (initial password is 5c1309)

 Note the five question marks.

 I've examined the DB, and it seems that the actual value recorded is just
 five of U+FFFD REPLACEMENT CHARACTER.

 Regards,
 Roman.

Does Windows use Unicode characters for your username?

As a work around, please, try

  $ fossil init test.sqlite -A Roman

--Leo--
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Bug: non-ASCII user names are corrupted

2012-02-15 Thread Richard Hipp
2012/2/15 Роман Донченко dxdra...@yandex.ru

 Hello,

 I'm using (well, trying to) Fossil on Windows. My username is Роман.
 This happens:

 F:\Sourcefossil init test.sqlite
 project-id: c162b4ff218ffca0d4f3fe26f20a34**fd5c7cf892
 server-id:  01814b880714e63786ef5af7b403f5**bb4fbee016
 admin-user: ? (initial password is 5c1309)

 Note the five question marks.

 I've examined the DB, and it seems that the actual value recorded is just
 five of U+FFFD REPLACEMENT CHARACTER.


Are you able to compile Fossil from sources?  Can you try out the following
patch and let me know if it clears your problem?

Index: src/db.c
==
--- src/db.c
+++ src/db.c
@@ -1143,11 +1143,11 @@
   if( zUser==0 ){
 zUser = db_get(default-user, 0);
   }
   if( zUser==0 ){
 #if defined(_WIN32)
-zUser = getenv(USERNAME);
+zUser = fossil_mbcs_to_utf8(getenv(USERNAME));
 #else
 zUser = getenv(USER);
 #endif
   }
   if( zUser==0 ){






 Regards,
 Roman.

 __**_
 fossil-users mailing list
 fossil-users@lists.fossil-scm.**org fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:**8080/cgi-bin/mailman/listinfo/**fossil-usershttp://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users


Re: [fossil-users] Bug: non-ASCII user names are corrupted

2012-02-15 Thread Richard Hipp
2012/2/15 Richard Hipp d...@sqlite.org


 2012/2/15 Роман Донченко dxdra...@yandex.ru

 Hello,

 I'm using (well, trying to) Fossil on Windows. My username is Роман.
 This happens:

 F:\Sourcefossil init test.sqlite
 project-id: c162b4ff218ffca0d4f3fe26f20a34**fd5c7cf892
 server-id:  01814b880714e63786ef5af7b403f5**bb4fbee016
 admin-user: ? (initial password is 5c1309)

 Note the five question marks.

 I've examined the DB, and it seems that the actual value recorded is just
 five of U+FFFD REPLACEMENT CHARACTER.


 Are you able to compile Fossil from sources?  Can you try out the
 following patch and let me know if it clears your problem?


I'm reasonably confident that the patch below will work, so I went ahead
and implemented it for every use of getenv() in Fossil.  The checkin is
here:  http://www.fossil-scm.org/fossil/ci/57152086b8?sbs=1

Users of Fossil with non-latin character sets on Windows:  Please check out
this change for me and let me know if it is working for you.  Thanks.




 Index: src/db.c
 ==
 --- src/db.c
 +++ src/db.c
 @@ -1143,11 +1143,11 @@
if( zUser==0 ){
  zUser = db_get(default-user, 0);
}
if( zUser==0 ){
  #if defined(_WIN32)
 -zUser = getenv(USERNAME);
 +zUser = fossil_mbcs_to_utf8(getenv(USERNAME));
  #else
  zUser = getenv(USER);
  #endif
}
if( zUser==0 ){






 Regards,
 Roman.

 __**_
 fossil-users mailing list
 fossil-users@lists.fossil-scm.**org fossil-users@lists.fossil-scm.org
 http://lists.fossil-scm.org:**8080/cgi-bin/mailman/listinfo/**
 fossil-usershttp://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users




 --
 D. Richard Hipp
 d...@sqlite.org




-- 
D. Richard Hipp
d...@sqlite.org
___
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users