skip to Main Content

Swift show price depends on Locale – Ios swift

I am getting a string value that represents a price. I want to convert it to another string with specific precision and format it according to a current device Locale. Decimal(string: "123,4567", locale: NSLocale.current)?.formatted(.number.precision(.fractionLength(precision))) This code works for the german…

VIEW QUESTION

Unzip not handling utf-8 in Node Alpine Docker image: how to set correct locale?

With this zip file, this Node script successfully outputs the files: const child_process = require('child_process') const util = require('util') const exec = util.promisify(child_process.exec) exec(`unzip -Z1 metamorpR.zip`).then(zip_contents => { if (zip_contents.stderr) { throw new Error(`unzip error: ${zip_contents.stderr}`) } console.log(zip_contents.stdout) }) metamorpR.z5…

VIEW QUESTION
Back To Top
Search