Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0


.NET cannot distinguish Shift_JIS from MS932(Windows-31J)

Context: Japanese character encoding Shift_JIS (シフトJIS) and Microsoft Codepage 932 (a.k.a. MS932, Windows-31J in IANA) are slightly different. For example, full-width cent sign (¢) is 0x8191 in both Shift_JIS and MS932, but it is mappe…

Trimmed characters by trim() are different between languages

String object in .NET (PowerShell), JavaScript, and Java all have trim() method. But trimmed characters by trim() are different between these languages. # codepoint .NET JavaScript Java 1 0000-0008 ✘ ✘ ✔ 2 0009-000D ✔ ✔ ✔ 3 000E-001F ✘ ✘ ✔…