public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] mtd: nand: Kconfig: drop utf8 characters
@ 2012-11-26 23:07 Wolfram Sang
  2012-11-26 23:18 ` Scott Wood
  2012-12-03 13:28 ` Artem Bityutskiy
  0 siblings, 2 replies; 8+ messages in thread
From: Wolfram Sang @ 2012-11-26 23:07 UTC (permalink / raw)
  To: linux-mtd; +Cc: Wolfram Sang, Martin Walch

The Linux Kernel Configuration system (lkc) expects 8 bit characters
only (declared in scripts/kconfig/zconf.l: %option 8bit). Fix two flaws
that cause minor glitches like broken characters in xconfig.

Reported-by: Martin Walch <walch.martin@web.de>
Signed-off-by: Wolfram Sang <wolfram@the-dreams.de>
---

Fixes bugzilla entry #43067

 drivers/mtd/nand/Kconfig |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/mtd/nand/Kconfig b/drivers/mtd/nand/Kconfig
index 4883139..5a5bae7 100644
--- a/drivers/mtd/nand/Kconfig
+++ b/drivers/mtd/nand/Kconfig
@@ -354,12 +354,12 @@ config MTD_NAND_SHARPSL
 	depends on ARCH_PXA
 
 config MTD_NAND_CAFE
-	tristate "NAND support for OLPC CAFÉ chip"
+	tristate "NAND support for OLPC CAFE chip"
 	depends on PCI
 	select REED_SOLOMON
 	select REED_SOLOMON_DEC16
 	help
-	  Use NAND flash attached to the CAFÉ chip designed for the OLPC
+	  Use NAND flash attached to the CAFE chip designed for the OLPC
 	  laptop.
 
 config MTD_NAND_CS553X
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-11-26 23:07 [PATCH] mtd: nand: Kconfig: drop utf8 characters Wolfram Sang
@ 2012-11-26 23:18 ` Scott Wood
  2012-12-03 13:29   ` Artem Bityutskiy
  2012-12-03 13:28 ` Artem Bityutskiy
  1 sibling, 1 reply; 8+ messages in thread
From: Scott Wood @ 2012-11-26 23:18 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Wolfram Sang, Martin Walch, linux-mtd

On 11/26/2012 05:07:25 PM, Wolfram Sang wrote:
> The Linux Kernel Configuration system (lkc) expects 8 bit characters
> only (declared in scripts/kconfig/zconf.l: %option 8bit).

That option contrasts with being limited to 7-bit characters, not with  
accepting UTF-8.  It may be that kconfig has problems with UTF-8, but I  
don't think this is why.

-Scott

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-11-26 23:07 [PATCH] mtd: nand: Kconfig: drop utf8 characters Wolfram Sang
  2012-11-26 23:18 ` Scott Wood
@ 2012-12-03 13:28 ` Artem Bityutskiy
  1 sibling, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2012-12-03 13:28 UTC (permalink / raw)
  To: Wolfram Sang; +Cc: Martin Walch, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 440 bytes --]

On Tue, 2012-11-27 at 00:07 +0100, Wolfram Sang wrote:
>  config MTD_NAND_CAFE
> -	tristate "NAND support for OLPC CAFÉ chip"
> +	tristate "NAND support for OLPC CAFE chip"

Wolfram, despite of all of my respect, I have to Nack this patch. We are
livin in 21st century and the world switched to UTF-8. If a lkc has
issues with UTF8 - it is lkc issues - it should rather be fixed.

Thanks!

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-11-26 23:18 ` Scott Wood
@ 2012-12-03 13:29   ` Artem Bityutskiy
  2012-12-03 13:29     ` Wolfram Sang
  2012-12-17  3:27     ` Martin Walch
  0 siblings, 2 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2012-12-03 13:29 UTC (permalink / raw)
  To: Scott Wood; +Cc: Wolfram Sang, Martin Walch, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 590 bytes --]

On Mon, 2012-11-26 at 17:18 -0600, Scott Wood wrote:
> On 11/26/2012 05:07:25 PM, Wolfram Sang wrote:
> > The Linux Kernel Configuration system (lkc) expects 8 bit characters
> > only (declared in scripts/kconfig/zconf.l: %option 8bit).
> 
> That option contrasts with being limited to 7-bit characters, not with  
> accepting UTF-8.  It may be that kconfig has problems with UTF-8, but I  
> don't think this is why.

Whatever has problems with UTF-8 - it is better to fix that instead of
hiding the problem by removing UTF-8 characters.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-12-03 13:29   ` Artem Bityutskiy
@ 2012-12-03 13:29     ` Wolfram Sang
  2012-12-17  3:27     ` Martin Walch
  1 sibling, 0 replies; 8+ messages in thread
From: Wolfram Sang @ 2012-12-03 13:29 UTC (permalink / raw)
  To: dedekind1; +Cc: Scott Wood, Martin Walch, linux-mtd

> Whatever has problems with UTF-8 - it is better to fix that instead of
> hiding the problem by removing UTF-8 characters.

Fair enough :)

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-12-03 13:29   ` Artem Bityutskiy
  2012-12-03 13:29     ` Wolfram Sang
@ 2012-12-17  3:27     ` Martin Walch
  2013-01-15 10:40       ` Artem Bityutskiy
  1 sibling, 1 reply; 8+ messages in thread
From: Martin Walch @ 2012-12-17  3:27 UTC (permalink / raw)
  To: dedekind1; +Cc: Scott Wood, Wolfram Sang, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 2307 bytes --]

Am Montag, 3. Dezember 2012, 15:29:13 schrieb Artem Bityutskiy:
> On Mon, 2012-11-26 at 17:18 -0600, Scott Wood wrote:
> > On 11/26/2012 05:07:25 PM, Wolfram Sang wrote:
> > > The Linux Kernel Configuration system (lkc) expects 8 bit characters
> > > only (declared in scripts/kconfig/zconf.l: %option 8bit).
> > 
> > That option contrasts with being limited to 7-bit characters, not with
> > accepting UTF-8.  It may be that kconfig has problems with UTF-8, but I
> > don't think this is why.
> 
> Whatever has problems with UTF-8 - it is better to fix that instead of
> hiding the problem by removing UTF-8 characters.

The kernel configuration system does not support multibyte characters. I have 
not found any hint that support for multibyte characters has been specified or 
taken into account. In many places throughout the configuration system, only 
single byte characters are assumed. In bug #43067

> https://bugzilla.kernel.org/show_bug.cgi?id=43067

I have attached screenshots showing a problem with utf-8 characters in the 
interactive nconfig menu.

More usage of utf-8 characters could even lead to worse problems: the flex 
scanner only allows the characters [A-Za-z0-9_] in symbol names. Other input 
will make the scanner ignore a character or refuse the input at all ("syntax 
error").

The handling of multibyte characters in string values depends on the 
configuration menu in use. menuconfig will not allow any multibyte input. When 
editing a predefined string with multibyte characters in it, things will break. 
nconfig is even worse. xconfig substitutes characters with '?'.

Character counts do not work correctly. When using many multibyte characters 
funny things happen like text lines being cut off.

To make a long story short: multibyte characters in Kconfig files lead to 
undefined behaviour. This is no implementation bug. The configuration system 
just has not been designed for processing them. So utf-8 support can not be 
achieved with an easy fix, but will need comprehensive changes.

I do not know if anyone is willing to actually make all the necessary work to 
properly support utf-8 in the configuration system. However, I suppose this 
will not happen any time soon. Therefore I suggest removing the multibyte 
characters for now. 

Regards
Martin Walch
-- 

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2012-12-17  3:27     ` Martin Walch
@ 2013-01-15 10:40       ` Artem Bityutskiy
  2013-01-15 11:00         ` Artem Bityutskiy
  0 siblings, 1 reply; 8+ messages in thread
From: Artem Bityutskiy @ 2013-01-15 10:40 UTC (permalink / raw)
  To: Martin Walch; +Cc: Scott Wood, Wolfram Sang, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1072 bytes --]

On Mon, 2012-12-17 at 04:27 +0100, Martin Walch wrote:
> 
> To make a long story short: multibyte characters in Kconfig files lead to 
> undefined behaviour. This is no implementation bug. The configuration system 
> just has not been designed for processing them. So utf-8 support can not be 
> achieved with an easy fix, but will need comprehensive changes.
> 
> I do not know if anyone is willing to actually make all the necessary work to 
> properly support utf-8 in the configuration system. However, I suppose this 
> will not happen any time soon. Therefore I suggest removing the multibyte 
> characters for now. 

Sure, thanks for a detailed analysis. What I agree with is removing
non-ASCII characters in case they cause a functional or build problems,
just because, as you said, fixing Kbuild is a big task.

However, in this particular case, this is just about user seeing rubbins
in the configuration menu, which is not a big deal, I think, so I would
prefer to rather expose the issue than fix it.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH] mtd: nand: Kconfig: drop utf8 characters
  2013-01-15 10:40       ` Artem Bityutskiy
@ 2013-01-15 11:00         ` Artem Bityutskiy
  0 siblings, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2013-01-15 11:00 UTC (permalink / raw)
  To: Martin Walch; +Cc: Scott Wood, Wolfram Sang, linux-mtd

[-- Attachment #1: Type: text/plain, Size: 484 bytes --]

On Tue, 2013-01-15 at 12:40 +0200, Artem Bityutskiy wrote:
> However, in this particular case, this is just about user seeing rubbins
> in the configuration menu, which is not a big deal, I think, so I would
> prefer to rather expose the issue than fix it.

Phrased badly. I wanted to say that in this particular case, when it is
only about not seeing UTF-8 characters in the menu, I prefer to expose
the issue rather than _hiding_ it.

-- 
Best Regards,
Artem Bityutskiy

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-01-15 10:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-26 23:07 [PATCH] mtd: nand: Kconfig: drop utf8 characters Wolfram Sang
2012-11-26 23:18 ` Scott Wood
2012-12-03 13:29   ` Artem Bityutskiy
2012-12-03 13:29     ` Wolfram Sang
2012-12-17  3:27     ` Martin Walch
2013-01-15 10:40       ` Artem Bityutskiy
2013-01-15 11:00         ` Artem Bityutskiy
2012-12-03 13:28 ` Artem Bityutskiy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox