cs: initialize locale on startup
The `current-locale` parameer value is transferred to the C lbrary via `setlocale` on demand by Racket functions that depend on the locale, but some libraries (like libedit) can also depend on the locale setting. By default, the C library starts with the "C" locale, so it's worthwhile to install the default locale on startup, even if that's not a complete solution to support changes to `current-locale`.
This commit is contained in:
parent
38570e3ea6
commit
e5899bd3e6
File diff suppressed because it is too large
Load Diff
|
@ -34,6 +34,8 @@
|
|||
(set! installed-locale (current-locale))
|
||||
(rktio_set_locale rktio (string->bytes/utf-8 installed-locale))))
|
||||
|
||||
(void (sync-locale!))
|
||||
|
||||
(define (locale-encoding-is-utf-8?)
|
||||
(define t (system-type))
|
||||
(define loc (current-locale))
|
||||
|
|
|
@ -33,6 +33,8 @@
|
|||
shared-ltps-place-init!)
|
||||
(only-in "locale/cache.rkt"
|
||||
convert-cache-init!)
|
||||
(only-in "locale/parameter.rkt"
|
||||
sync-locale!)
|
||||
"port/place.rkt")
|
||||
|
||||
(provide (all-from-out "port/main.rkt")
|
||||
|
@ -69,7 +71,8 @@
|
|||
(shared-ltps-place-init!)
|
||||
(install-error-value->string-handler!)
|
||||
(init-current-directory!)
|
||||
(init-current-ports! in-fd out-fd err-fd cust plumber))
|
||||
(init-current-ports! in-fd out-fd err-fd cust plumber)
|
||||
(sync-locale!))
|
||||
|
||||
(define (io-place-destroy!)
|
||||
;; We expect everything based on rktio to be destroyed at this point
|
||||
|
|
Loading…
Reference in New Issue
Block a user