-
-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GDAL_FILENAME_IS_UTF8 config option doesn't work for cyrillic symbols #38
Comments
That's interesting, but currently I don't see here any solution. In my opinion this should be resolved internally in GDAL. Anyway thanks, just found that on linux, configure has additional flag for |
I'm not sure it's gdal's internal issue. I've tested the same dataset with the same paths with: docker run -it -v D:/test:/test-data --rm osgeo/gdal
gdalbuildvrt "/test-data/input-eng/input.vrt" "/test-data/input-eng/input data.tif" -overwrite
gdalbuildvrt "/test-data/input-cyr/input.vrt" "/test-data/input-cyr/исходные данные.tif" -overwrite Everything worked out without any issues or warnings. Testing with ./gdalbuildvrt D:/test/input-eng/input.vrt "D:/test/input-eng/input data.tif" -overwrite --config GDAL_FILENAME_IS_UTF8 NO
./gdalbuildvrt D:/test/input-eng/input.vrt "D:/test/input-eng/input data.tif" -overwrite --config GDAL_FILENAME_IS_UTF8 YES
./gdalbuildvrt D:/test/input-cyr/input.vrt "D:/test/input-cyr/исходные данные.tif" -overwrite --config GDAL_FILENAME_IS_UTF8 NO
./gdalbuildvrt D:/test/input-cyr/input.vrt "D:/test/input-cyr/исходные данные.tif" -overwrite --config GDAL_FILENAME_IS_UTF8 YES The only failed test was number 3 (with |
Tested with your code, a bit adjusted it for xunit tests. Another important detail that docker images were built on Ubuntu20.04 and newer for windows. |
More on this. I had to test cyrillic symbols via clipboard as on Windows 10 console I can't input them dirrectly and it's not a font issue. Console behaviour is weird, as it works likely via tty layer, carret just randomly jumps on input. |
Sorry for a late answer. I've tested the latest vcpkg's build (version 3.2.2, x64-windows) and it seems to work fine with cyrillic symbols (though I've encountered this old issue: OSGeo/gdal#568). |
Maybe need to close this issue? |
Sorry for necroposting, but the issue isn't resolved actually. Just tested it on win11 pc with 3.3.3 binaries and it fails. Tests mentioned in commit above runs under ubuntu-latest runner -- and yes, there's no issue with cyrillic paths on linux indeed. |
@Gigas002 Here's a dirty hack, or what I changed in tests, those are executed on windows. gdal.netcore/test/GdalCore-XUnit/RasterTests.cs Lines 84 to 92 in eaed641
|
Well, 4th test fails for me too, but IMO the main problem that is the 2nd test fails for the same reason. That happens even if I try to convert paths manually like this: var cyrillicBytes = Encoding.Default.GetBytes(cyrillicPath);
var utf8Path = Encoding.UTF8.GetString(cyrillicBytes); |
That's really weird, what's the output on |
No one's taken this issue on Gdal's repo for 2 years now, so I decided to test it on your version of gdal bindings.
Any geotiff on input will pass as input data. Slightly updated test code:
Click to expand
Tested on Win10 x64,
MaxRev.Gdal.Core
ver.3.2.0.250
,MaxRev.Gdal.WindowsRuntime.Minimal
ver.3.2.0.250
. Run on.NET
ver.5.0.2
.Interesting difference with original issue, that
Test 4
now produces the almost correct.vrt
file, yet the naming of file is corrupted and the path inside of file too. Also, on the last test, Gdal fails to open dataset, butGdalBuildVrt
doesn't seem to throw any warnings or exceptions.This also reminds me about #23.
Did we end up usingAh, don't mind, found it in GdalCore.opt.iconv
in vcpkg, or no?The text was updated successfully, but these errors were encountered: