...

View Full Version : How to recognize letters accented?



triko
11-26-2012, 08:40 PM
Hi all guy... I have the next problem... In my code I need that program recognize the letters accented: , like a normal vowels and dont a consonant!! :D I have insert


<meta charset = "UTF-8" >

But nothing doesn't happen

devnull69
11-26-2012, 09:27 PM
Sadly enough you won't even get the price for "least information possible" ... there are problem descriptions that are worse

Nevertheless: Please show us your magic code that recognizes the accented letters as consonants. How else should we know? Even my crystal ball got a headache from this ...

Philip M
11-26-2012, 10:51 PM
But nothing doesn't happen

The correct English is "Nothing doesn't never happen". :D = "Nothing happens".

I think he means that he has defined aeiou as vowels, and other letters as consonants, but now has run up against accented letters which he wants to treat as vowels.



<script type = "text/javascript">
var x= " ";
if (/^[]/.test(x)) {
alert ("String contains an accented character");
}
</script>

triko
11-28-2012, 04:37 PM
The correct English is "Nothing doesn't never happen". :D = "Nothing happens".

I think he means that he has defined aeiou as vowels, and other letters as consonants, but now has run up against accented letters which he wants to treat as vowels.



<script type = "text/javascript">
var x= " ";
if (/^[]/.test(x)) {
alert ("String contains an accented character");
}
</script>

Ok, but have a problem, the program read the " ' " than a "?"... And then return is null because don't recognize letters accented!!!
It's for <meta> error??

Philip M
11-28-2012, 04:40 PM
Ok, but have a problem, the program read the " ' " than a "?"... And then return is null because don't recognize letters accented!!!
It's for <meta> error??

Sorry, not a clue what you mean. You must express yourself in English more clearly.

But there was a typo in my script in Post #3 - should be

if (/[]/.test(x)) {

^ means at the start of the string

Have a look at http://www.tuxlanding.net/how-to-display-the-accented-characters-in-javascript/

triko
11-28-2012, 05:44 PM
Sorry, not a clue what you mean. You must express yourself in English more clearly.

But there was a typo in my script in Post #3 - should be

if (/[]/.test(x)) {

^ means at the start of the string

Have a look at http://www.tuxlanding.net/how-to-display-the-accented-characters-in-javascript/

Ok, so, I found the final problem. I do convert the letters accented: "" "" "" "" "" "", to the normal letters aeiou!! Because my program read the letters accented with consonants and I don't would this!!! :D
Now is it more clear? :D

Philip M
11-28-2012, 06:12 PM
Ok, so, I found the final problem. I do convert the letters accented: "" "" "" "" "" "", to the normal letters aeiou!! Because my program read the letters accented with consonants and I don't would this!!! :D
Now is it more clear? :D

So you are using replace() to convert accented letters into their non-accented equivalents? But why do you not simply add the accented characters to your list of vowels?

triko
11-28-2012, 06:36 PM
So you are using replace() to convert accented letters into their non-accented equivalents? But why do you not simply add the accented characters to your list of vowels?

Because I don't say, if accented letters is vowels or consonants :D

Philip M
11-28-2012, 06:40 PM
Because I don't say, if accented letters is vowels or consonants :D

Accented characters which are vowels if unaccented are still vowels if they are accented. In any European language.

triko
11-28-2012, 07:59 PM
Accented characters which are vowels if unaccented are still vowels if they are accented. In any European language.

xD
Ok! I will remember, this! :D Thankssss



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum