equal
deleted
inserted
replaced
9 # GNU General Public License version 2, incorporated herein by reference. |
9 # GNU General Public License version 2, incorporated herein by reference. |
10 # |
10 # |
11 |
11 |
12 '''allow the use of MBCS paths with problematic encodings |
12 '''allow the use of MBCS paths with problematic encodings |
13 |
13 |
14 Some MBCS encodings are not good for some path operations (i.e. |
14 Some MBCS encodings are not good for some path operations (i.e. splitting |
15 splitting path, case conversion, etc.) with its encoded bytes. We call |
15 path, case conversion, etc.) with its encoded bytes. We call such a encoding |
16 such a encoding (i.e. shift_jis and big5) as "problematic encoding". |
16 (i.e. shift_jis and big5) as "problematic encoding". This extension can be |
17 This extension can be used to fix the issue with those encodings by |
17 used to fix the issue with those encodings by wrapping some functions to |
18 wrapping some functions to convert to Unicode string before path |
18 convert to Unicode string before path operation. |
19 operation. |
|
20 |
19 |
21 This extension is useful for: |
20 This extension is useful for: |
22 * Japanese Windows users using shift_jis encoding. |
21 * Japanese Windows users using shift_jis encoding. |
23 * Chinese Windows users using big5 encoding. |
22 * Chinese Windows users using big5 encoding. |
24 * All users who use a repository with one of problematic encodings on |
23 * All users who use a repository with one of problematic encodings on |
28 * Any user who use only ASCII chars in path. |
27 * Any user who use only ASCII chars in path. |
29 * Any user who do not use any of problematic encodings. |
28 * Any user who do not use any of problematic encodings. |
30 |
29 |
31 Note that there are some limitations on using this extension: |
30 Note that there are some limitations on using this extension: |
32 * You should use single encoding in one repository. |
31 * You should use single encoding in one repository. |
33 * You should set same encoding for the repository by locale or |
32 * You should set same encoding for the repository by locale or HGENCODING. |
34 HGENCODING. |
|
35 |
33 |
36 Path encoding conversion are done between Unicode and |
34 Path encoding conversion are done between Unicode and encoding.encoding which |
37 encoding.encoding which is decided by Mercurial from current locale |
35 is decided by Mercurial from current locale setting or HGENCODING. |
38 setting or HGENCODING. |
|
39 ''' |
36 ''' |
40 |
37 |
41 import os |
38 import os |
42 from mercurial.i18n import _ |
39 from mercurial.i18n import _ |
43 from mercurial import util, encoding |
40 from mercurial import util, encoding |