diff options
author | Laszlo Csomor <laszlocsomor@google.com> | 2017-10-19 10:24:13 +0200 |
---|---|---|
committer | Damien Martin-Guillerez <dmarting@google.com> | 2017-10-20 14:04:05 +0200 |
commit | 6485ec691596849d89f30eed0ea529bebd3fd71f (patch) | |
tree | 1dccb02e9dbb2f38bf9f738183a09847b1911b35 /src/test/cpp | |
parent | f9a379157d1e992390c5b6f0b75ef853e0870689 (diff) |
Windows,JNI: use wstrings only
In this commit:
- fix the Windows JNI library to only use UTF-16
strings
Converting between multi-byte strings (UTF-8) and
wstrings (UTF-16) always carries the risk of
incorrectly handling the strings. It also takes
time, even if not much.
Not converting the strings but using the raw Java
strings (which are in fact UTF-16 strings)
simplifies the code and allows using non-ASCII
paths (at least in the JNI module, even if Bazel
as a whole doesn't support non-ASCII characters).
Change-Id: I827fbe92a1bbefac049a1e34ac1738c965ed2e9c
PiperOrigin-RevId: 172715277
Diffstat (limited to 'src/test/cpp')
-rw-r--r-- | src/test/cpp/util/file_windows_test.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/test/cpp/util/file_windows_test.cc b/src/test/cpp/util/file_windows_test.cc index 709b1d4424..5b3809b2af 100644 --- a/src/test/cpp/util/file_windows_test.cc +++ b/src/test/cpp/util/file_windows_test.cc @@ -64,7 +64,7 @@ class FileWindowsTest : public ::testing::Test { wstring wtarget; \ EXPECT_TRUE(AsWindowsPath(name, &wname)); \ EXPECT_TRUE(AsWindowsPath(target, &wtarget)); \ - EXPECT_EQ("", CreateJunction(wname, wtarget)); \ + EXPECT_EQ(L"", CreateJunction(wname, wtarget)); \ } // Asserts that dir1 can be created with some content, and dir2 doesn't exist. |