[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/wsr/ - Worksafe Requests

Name
Options
Comment
Verification
4chan Pass users can bypass this verification. [Learn More] [Login]
File
  • Please read the Rules and FAQ before posting.

08/21/20New boards added: /vrpg/, /vmg/, /vst/ and /vm/
05/04/17New trial board added: /bant/ - International/Random
10/04/16New board for 4chan Pass users: /vip/ - Very Important Posts
[Hide] [Show All]


[Advertise on 4chan]


File: file.png (53 KB, 749x402)
53 KB
53 KB PNG
How to deal with SHIFT_JIS on linux? only workaround i know is to use iconv, anyway to make it readable systemwide?
>>
which distro?
on arch-based ones, you would uncomment
ja_JP.UTF-8 UTF-8
on /etc/locale.gen
https://wiki.archlinux.org/title/Locale#Generating_locales
>>
File: file.png (63 KB, 1230x292)
63 KB
63 KB PNG
>>1554850
Honestly unless you are using a extremely retarded distro like ubuntu the solution should be universal. I have no problems with UTF-8 chars I also don't think you need the japanese locale tho show the characters, although I have it, but the characters will render like traditional chinese. My problem is with SHIFT-JIS charactes I want to read them with ls and cat. I use arch btw
>>
>>1554825
>>1554887
>only workaround i know is to use iconv
Seems you already had it figured out. There is no way to make it work correctly everywhere other than converting it to UTF-8.
This wiki page has some tips you might find useful:
https://wiki.archlinux.org/title/Character_encoding

Your terminal is going to be UTF-8, and so it cannot display SJIS-encoded text correctly.
It will work in things like vim with the right config, but that's because it coverts the text when you open the file.

If you really want to leave the files as they are for some reason, you could pipe those commands to iconv. I just tried it with one of those touhou readmes that zun still makes with SJIS to this day, and it works great.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.