taoensso / tower

i18n & L10n library for Clojure/Script
https://www.taoensso.com/tower
Eclipse Public License 1.0
278 stars 24 forks source link

Wrong Swedish currency output #69

Closed stavling closed 8 years ago

stavling commented 8 years ago
(fmt :sv-SE 200 :currency)
=> "200,00 kr"

All is correct

(fmt :sv-SE 2000 :currency)
=> "2á000,00 kr"
;; Should be => "2000,00 kr"

This happens for every thousand:

(fmt :sv-SE 2000000 :currency)
=> "2á000á000,00 kr"
;; Should be => "2000000,00 kr"
ptaoussanis commented 8 years ago

Hey there,

Could this possibly be a JVM resource / font issue?

((fmt :sv-SE 2000000 :currency) translates into (.format (NumberFormat/getCurrencyInstance (locale :sv-SE)) 2000) which produces "2 000,00 kr" on my device

Note that the space between the 2 and 0 is actually the non-breaking-space unicode character (\x{A0}). In my emacs, it looks like a "_". But it's rendering correctly in my browser (Chrome).

stavling commented 8 years ago

Ah, yes!

You are correct, sorry for the late reply.