I believe there are numerous typos in this file. Starting at line 310, there seem to be several missing double quotes; they break compilation if -Wwrite-strings is specified. I was going to assume the missing quotes to be the only factor and fix things myself. But as there are some non-printing characters in there that I don't understand, I thought I would mention it here, instead, so that someone who knows about keyboard layouts might fix these arrays properly.
-- Andy.
On 6/8/06, Andrew Talbot Andrew.Talbot@talbotville.com wrote:
I believe there are numerous typos in this file. Starting at line 310, there seem to be several missing double quotes; they break compilation if -Wwrite-strings is specified. I was going to assume the missing quotes to be the only factor and fix things myself. But as there are some non-printing characters in there that I don't understand, I thought I would mention it here, instead, so that someone who knows about keyboard layouts might fix these arrays properly.
Can you give us some examples of possible typos? I think people will be more inclined to look into the problem if they see a definite problem pointed out.
James Hawkins wrote:
Can you give us some examples of possible typos? I think people will be more inclined to look into the problem if they see a definite problem pointed out.
I have worked out what is happening. Assuming the newsgroup system can render the characters properly, in Vim, a sample array looks like this, containing some accented characters:
/*** Icelandic keyboard layout (setxkbmap is) */ static const char main_key_IS[MAIN_LEN][4] = { "°","1!","2"","3#","4$","5%","6&","7/","8(","9)","0=","öÖ","-_", "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","ðÐ","'?", "aA","sS","dD","fF","gG","hH","jJ","kK","lL","æÆ","´Ä","+*", "zZ","xX","cC","vV","bB","nN","mM",",;",".:","þÞ", "<>" };
I have the text editor I use - Kate - set to use utf8 encoding, which renders the same text thus:
/*** Icelandic keyboard layout (setxkbmap is) */ static const char main_key_IS[MAIN_LEN][4] = { "","1!","2"","3#","4$","5%","6&","7/","8(","9)","0=","�","-_", "qQ","wW","eE","rR","tT","yY","uU","iI","oO","pP","�","'?", "aA","sS","dD","fF","gG","hH","jJ","kK","lL","�","�,"+*", ^ missing double quote "zZ","xX","cC","vV","bB","nN","mM",",;",".:","�, "<>" };
If I save this file in my editor, I inadvertently corrupt it into this second form. I suppose further such accidents (most likely to affect English people, who do not generally use accented characters) would be prevented if the accented characters were replaced with hex escape sequences. The downside being that one would not be able to see what characters they were via a suitable editor, but that may be less important.
I guess, for now, if I want to edit a file that contains high-order characters, I will need to change the encoding setting of the editor to one that can accommodate the full character set.
Thanks,
-- Andy.
Andrew Talbot wrote:
I guess, for now, if I want to edit a file that contains high-order characters, I will need to change the encoding setting of the editor to one that can accommodate the full character set.
Thanks,
-- Andy.
Why not submit a bug for Kate? It should detect the encoding automatically if Vim can.