Accents do not work as expected
#1
On my keyboard layout I just hit a key before the letter I want to put an accent over, but when I tried to rename an episode name in XBMC the accent was displayed right away and the only way for me to display the correct accented letter, seeing as copying from outside XBMC and pasting inside it doesn't even work, was to change my layout to one I was unfamiliar with temporarily in order to press one key. I'm lucky I didn't encounter any letters with a circumflex accent over them, because I think I'd have to make my own keyboard layout to get that to work.

For example, I have to press ` then e to get è, but it just displays ` before I press the e and I can't get the correct letter to show up.
Reply
#2
What OS? In Windows I'd be surprised if the procedure you describe will work with XBMC because of the way XBMC processes keyboard input.

JR
Reply
#3
Yep, Windows. And if there's no way to type accents what am I supposed to do? It's not like I'm using some kind of obscure keyboard layout, it's standard here, and a lot of layouts use the same system. It's worked fine in every program I've ever used before.
Reply
#4
I'd guess you are using the International keyboard layout. This remembers what key you pressed last and modifies the next keypress accordingly, so as in the example you gave, when you press ` it doesn't immediately generate a ` character but waits to see what you are going to press next.

The problem is that Windows generates two messages when you press a key. First you get a WM_KEYDOWN message that tells you what key was pressed, then if the key pressed is a printing character you get a WM_CHAR that tells you what character was generated. So with the non-international keyboard layout, when you press ` the e you get four messages:

Code:
WM_KEYDOWN - ` key pressed
WM_CHAR    - ` character generated
WM_KEYDOWN - e key pressed
WM_CHAR    - e character generated

With the International keyboard layout Windows supresses the first WM_CHAR message while it waits to see what you're going to press next, so pressing ` then e produces three messages:

Code:
WM_KEYDOWN - ` key pressed
WM_KEYDOWN - e key pressed
WM_CHAR    - è character generated

Apps like, for example, Notepad only process the WM_CHAR messages, so in Notepad with the International keyboard typing ` then e types a single è character. However XBMC does not process WM_CHAR, but instead uses only the WM_KEYDOWN messages. hence XBMC only sees that you typed ` then e and doesn't see the è WM_CHAR message generated by the International keyboard driver.

XBMC was coded this way for good reasons, but as you've found, there are downsides. It also means the alt 0232 key sequence won't generate an è character either.

I must admit that this limitation had never occurred to me before, and in fact yours is the first post I can recall on the subject. We have lots of international users, but they tend to use their regional keyboard layout where the accented keys they need are on the keyboard. I also have to admit that I can't immediately think of an easy solution. Modifying XBMC to process the WM_CHAR messages would be hard, because when the WM_KEYDOWN message is received it's not always obvious whether you can ignore it and wait for a WM_CHAR message, or whether you need to process the WM_KEYDOWN immediately. However it would be possible to add a limited facility for pasting into XBMC edit controls. That would allow you to copy and paste accented characters from e.g. Character Map. I'll have a think about this.

JR
Reply
#5
I assume that the majority of people doesn't need to rename episode names. I wanted to do it because TVDB doesn't have a French entry for the series and the spoken language in the version of the show I have is French, so I wanted to be accurate. It's not a huge deal, but it is pretty annoying. The only letter I can type in one keystroke is é, which isn't nearly enough when French uses the grave and circumflex accents, tremas and cedillas.

I use the Canadian French keyboard layout, but as far as I'm aware, most layouts that support accents behave like that. I don't think it would be possible to have à, è, é, â, ê, ô, û, î, ë, ü, ç, etc. all on the keyboard and usable with a single keystroke in addition to all punctuation and alphanumeric characters.

EDIT: Okay, so the TV show actually IS available in French, but TVDB discriminates and refuses to scrape it, claiming it is not found.
Wow. I changed the language of the scraper to fr and it still refuses to work.

For reference, it's that series: http://thetvdb.com/?tab=series&id=78783&lid=7. The English and French titles are different but they share the same entry.
Reply
#6
Ah, OK, I didn't realise the French keyboard did the trick too, but I've just tested it and indeed it does.

This is a limitation of the way XBMC handles keyboard input. I'm not sure this is an easy thing to fix.

JR
Reply
#7
So there's no workaround for this? I mean, Themoviedb scrapes 'Un Propète' as 'A Prophet', which kind of circumvents the problem. But not if you want the original title in your list.... Sad
Reply
#8
You have to type it like that: Un prophète

But yeah it's a pain in the ass because I have to modify every single nfo for my French movies using the Character Encoding Western (ISO-8859-1). Still, I can't figure out how to have the letter a with the accent on top...
Box 1: ODroid N2+ 4GB
Box 2: Intel NUC D34010WYK (Windows afedchin's Krypton MVC Build)
Box 3: Vero 4K
RIP schimi2k | I miss you buddy :(
Reply

Logout Mark Read Team Forum Stats Members Help
Accents do not work as expected0