-
Notifications
You must be signed in to change notification settings - Fork 13.3k
extra::time: test failure on Win32 non-English locale #9418
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
Labels
O-windows
Operating system: Windows
Comments
I'm pretty sure this stuff in thread-unsafe on Windows too... |
klutzy
added a commit
to klutzy/rust
that referenced
this issue
Nov 5, 2013
Previously rust-lang#9418 fixed utf-8 assertion issue by wcsftime, but the function didn't work as expected: it follows the locale set by setlocale(), not the system code page. This patch fixes it by manual multibyte-to-unicode conversion.
bors
added a commit
that referenced
this issue
Nov 8, 2013
Previously #9418 fixed utf-8 assertion issue by wcsftime, but the function didn't work as expected: it follows the locale set by setlocale(), not the system code page. This patch fixes it by manual multibyte-to-unicode conversion.
flip1995
pushed a commit
to flip1995/rust
that referenced
this issue
Sep 9, 2022
Fix `mut_mutex_lock` when Mutex is behind immutable deref I *think* the problem here is the `if let ty::Ref(_, _, Mutability::Mut) = cx.typeck_results().expr_ty(recv).kind()` line tries to check if the `Mutex` can be mutably borrowed (there already is a test for `Arc<Mutex<_>>`), but gets bamboozled by the `&mut Arc` indirection. And I *think* checking the deref-adjustment to filter immutable-adjust (the deref through the `Arc`, starting from `&mut Arc`) is the correct fix. Fixes rust-lang#9415 changelog: Fix `mut_mutex_lock` when Mutex is behind immutable deref
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
libextra/time.rs
has#[test] fn run_tests()
, which fails on my machine (win8.1, korean locale):It is because
rust_localtime
function inrt/rust_builtin.cpp
usesbut it returns ANSI string rather than utf-8, so assertion failed at
str
.In my machine
buffer
gets'\xb4\xeb\xc7\xd1\xb9\xce\xb1\xb9 \xc7\xa5\xc1\xd8\xbd\xc3'
, "대한민국 표준시" in CP949.It is fixable by using
wcsftime
which returns utf-16. I'll try it.The text was updated successfully, but these errors were encountered: