Ticket #215 (new bug)

Opened 3 years ago

Last modified 3 months ago

Problem with special characters

Reported by: fekdahl@… Owned by: jackburton
Priority: high Milestone: R1
Component: Applications/Terminal Version: R1 development
Cc: diver, revol@… Blocked By: #1855
Platform: All Blocking: #3047

Description

Writing swedish special characters (??????) doesn't work in Terminal. Nothing appears on screen, except when pressing ?; then it says "(arg: 6)". Using these characters in all other tested apps work fine.

Attachments

DataTranslations.png (61.2 KB) - added by fekdahl@… 3 years ago.
Screenshot…

Change History

Changed 3 years ago by fekdahl@…

Screenshot...

  Changed 3 years ago by sikosis

  • status changed from new to assigned

  Changed 3 years ago by korli

I did a fix in revision 16496 for 1 byte characters which need option key. I don't know if the bug was about this.

  Changed 3 years ago by fekdahl@…

I haven't tried that revision yet, but it doesn't sound like the same problem since you don't need to press any additional key to type ??? or ??? on swedish keyboards.

  Changed 3 years ago by jackburton

Bug is still showing up. Italian multibyte characters like "?", "?", etc. aren't drawn correctly either.

  Changed 3 years ago by axeld

  • status changed from assigned to new

  Changed 3 years ago by axeld

  • owner changed from sikosis to axeld

  Changed 3 years ago by korli

Must be a tty problem, as we write good bytes and read wrong ones. Changing component ...

  Changed 3 years ago by korli

  • component changed from Applications to Kernel

  Changed 3 years ago by korli

Last comment is wrong : it seems bash hasn't been built multibyte support (yet)

  Changed 3 years ago by korli

  • component changed from Kernel to Applications

  Changed 3 years ago by jackburton

There is a patch done by mmu_man around. Maybe he even sent it to our mailing list?

  Changed 3 years ago by diver

  • cc diver added

  Changed 3 years ago by korli

  • bug_group set to developers

  Changed 3 years ago by johndrinkwater

  • cc revol@… added

  Changed 3 years ago by johndrinkwater

Following on from comment 7, added Fran?ois to CC

  Changed 3 years ago by revol@…

It could be simpler to switch to bash 3.0 right away. It has problems in Zeta re. utf-8 but that's because the glibc in zeta is old. Which glibc do we use btw ?

  Changed 20 months ago by nielx

  • owner changed from axeld to jackburton
  • platform set to All
  • component changed from - Applications to - Applications/Terminal

Move to the proper component.

  Changed 18 months ago by nielx

Bug #1699 is marked as a duplicate of this bug.

  Changed 18 months ago by jackburton

It's a bash problem, though, not Terminal's.

follow-up: ↓ 21   Changed 17 months ago by jackburton

  • milestone changed from R1 to R1/alpha1

Interestingly bash 3.2 suffers from the same problem. Maybe it's a (bash) build configuration issue?

in reply to: ↑ 20 ; follow-up: ↓ 22   Changed 17 months ago by jackburton

Replying to jackburton:

Interestingly bash 3.2 suffers from the same problem. Maybe it's a (bash) build configuration issue?

Replying to myself: Yes, it's a build configuration issue. Defining HAVE_WCTYPE and HAVE_MBSTATE to 1 enables multibyte support in bash. Doing so, though, triggers a problem: haiku doesn't boot anymore (hangs on INIT: Bootscript started).

in reply to: ↑ 21   Changed 17 months ago by jackburton

Yes, it's a build configuration issue. Defining HAVE_WCTYPE and HAVE_MBSTATE to 1 enables multibyte support in bash. Doing so, though, triggers a problem: haiku doesn't boot anymore (hangs on INIT: Bootscript started).

Replying to myself, again: It's pretty obvious it doesn't work, since our mbrtowc() method is a no-op.

  Changed 16 months ago by jackburton

depends on #1855.

  Changed 12 months ago by korli

  • blockedby 1855 added

  Changed 8 months ago by jackburton

  • milestone changed from R1/alpha1 to R1

Change milestone to R1

  Changed 8 months ago by bonefish

  • blocking 3047 added

(In #3047) Duplicate of #215.

BTW, please use a small "r" when referring to revisions (i.e. r28446 instead of R28446); only then Trac hyperlinks it correctly.

  Changed 8 months ago by jackburton

I added some printfs() in the code, and it seems that, like korli said in a comment, 3 years ago, "Must be a tty problem, as we write good bytes and read wrong ones". I have no idea if bash is involved: IOW: I don't know how the data flow looks like. But in Shell::Write(), the bytes look correct (for the "à" character, it's 0xc3 0xa0). But this sequence never show up in TermParse::_ReadParserBuffer(). Actually, nothing shows up there when I hit this key.

  Changed 3 months ago by andreas_dr

  • version set to R1 development

its not a tty problem. i checked the code and did not see any problem with it. it does not show up in TermParse::_ReadParserBuffer() because the shell is interpreting the char not correctly.

Note: See TracTickets for help on using tickets.