Opened 11 years ago
Closed 9 years ago
#4884 closed defect (wontfix)
Language I/O support for command line program on windows platform.
Reported by: | miyukioki | Owned by: | warmerdam |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | OGR_SF | Version: | svn-trunk |
Severity: | normal | Keywords: | multi language windows |
Cc: |
Description
I made patch for GDAL/ogr command line program on windows platform.
https://www.box.com/s/tqvek2gso065iq7lmo3c
ogr_lang.diff is patch for version 'gdal-2.0dev.'
https://svn.osgeo.org/gdal/trunk/gdal
This patch concept is 'using CP_ACP' for command line program.
CP_ACP description was here.
http://msdn.microsoft.com/en-us/library/windows/desktop/dd374130(v=vs.85).aspx
First time, on windows platform, it's fine to
run batch file with UTF-8. But argument charcter code
chagned through. To understand this problem,
see follow test code.
https://www.box.com/s/zi6ugdjcjrwf7h4ycj7c
Attachments (2)
Change History (9)
by , 11 years ago
Attachment: | ogr_lang.diff added |
---|
follow-up: 2 comment:1 by , 11 years ago
Is this a problem of reading file whose path includes non-ascii characters? If so, you can solve it by following statement.
SET GDAL_FILENAME_IS_UTF8=NO
Is there any other problem?
comment:2 by , 11 years ago
Replying to akaginch:
Is this a problem of reading file whose path includes non-ascii characters? If so, you can solve it by following statement.
SET GDAL_FILENAME_IS_UTF8=NOIs there any other problem?
No, any other problem. This patch is command line argument (I/O) for non-ascii characters.
eg. ogr2ogr -nln 日本語 ... ogr2ogr -nln 你好 ...
follow-up: 4 comment:3 by , 11 years ago
A batch file can do it. The advantage of this way is that it is not necessary to change existing codes (including output part).
utf8 ogr2ogr D:\東京都.shp D:\市町村界.shp -sql "SELECT * FROM '市町村界' WHERE Name LIKE '東京都%'" -lco "ENCODING=LDID/19"
comment:4 by , 11 years ago
Replying to akaginch:
A batch file can do it. The advantage of this way is that it is not necessary to change existing codes (including output part).
utf8 ogr2ogr D:\東京都.shp D:\市町村界.shp -sql "SELECT * FROM '市町村界' WHERE Name LIKE '東京都%'" -lco "ENCODING=LDID/19"
Hi, Akaginchi san
Yes, I know. Did you read my post? This approach still has problem. Please check, follow code.
First time, on windows platform, it's fine to run batch file with UTF-8. But argument charcter >code chagned through. To understand this problem, see follow test code.
comment:6 by , 11 years ago
Akaginch san, Thank you for pointing optfile.
Yes, now I completely understand. Option 'optfile' is best practice. This patch doesn't needed.
BTW, most people doesn't understand, how to avoid language problem. Document will be needed by this thema.
comment:7 by , 9 years ago
Resolution: | → wontfix |
---|---|
Status: | new → closed |
Author of the patch considers in the latest comment that an alternative suggestion to use a batch file + optfile option is better. Closing ticket as wontfix.
patch file