NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: curses(3) handling of UTF-8 in various programs



On 2018-07-31 18:21, Cág wrote:
I wrote:

Suppose you have a file named frúh.mp3. ls(1) in its directory shows
as it is: frúh.mp3. My locale is UTF-8.

A minor correction: I meant früh instead of frúh. frúh.mp3 in noice
would look like frúh.mp3.

How it is shown depends on how the software is interpreting it, as well as how it is visualizing it.

It's quite common for people to confuse the two. When you run ls, for example, chances are that ls don't do or care one bit. It's all processed by the terminal application that is drawing your window.

A different program might be running inside a terminal, and then it should basically just also not try to touch or understand, and it will be rendered correctly, assuming your terminal application have the right information on how to interpret and visualize.

A program that manages its own visualization needs to process and manage this itself. The filename is most likely Unicode, encoded using UTF-8. So, the program needs to understand this, and do the decoding of the UTF-8 stuff, and then be able to visualize Unicode characters.

Now, what was the question?

  Johnny

--
Johnny Billquist                  || "I'm on a bus
                                  ||  on a psychedelic trip
email: bqt%softjar.se@localhost             ||  Reading murder books
pdp is alive!                     ||  tryin' to stay hip" - B. Idol


Home | Main Index | Thread Index | Old Index