Re: [PATCH 17/18] fs: Fix copyright symbol in printk()

Ricard Wanderlof
2013-04-23T04:44:28Z

On Tue, 23 Apr 2013, Marek Vasut wrote:

>>> printk() as the later produces the following output on dmesg
>>>
>>> instead of the expected one:
>>> jffs2: version 2.2. (NAND) \xffffffc2\xffffffa9 2001-2006 Red Hat, Inc.
>>>
>>> Signed-off-by: Marek Vasut <marex@denx.de>
>>> Cc: David Woodhouse <dwmw2@infradead.org>
>>
>> You appear to have discovered a problem with printk. Let's *fix* it
>> rather than regressing to the 20th century to work around it though?
>
> Should printk() even be capable of printing UTF8 stuff like that? How should I
> go about this?

A lot of debugging in embedded systems happens over serial lines. While it
might be nice to be able to print symbols like the copyright, I would
think it has little value compared to the practicality of being able to
connect whatever serial terminal or terminal emulator is available without
getting odd character sequences.

What I'm trying to say is that it's not just printk that's at fault, it's
worth considering the environment which printk is used in.

/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30