Convert ΓΊ to u in javascript

How to convert ΓΊ to u in javascript. Perhaps I will need this for other non-English characters.

+1
source share
5 answers

I asked a similar question a while ago: JavaScript equivalent of XPaths translate ()?

I think you can use the result.

+4
source

MovableType has a dirify function that does this. Here is the PHP version. These are, in fact, large search tables, so they are easy to port to JavaScript.

In theory, you can parse Unicode tables and follow symbolic links until you press ASCII, but this may not be practical for you.

+2

( .NET): () .NET?

, . "" , , .

0
0

function Englishizer(var strIn)
{   
 var strOut
    var strMid
    var n 
    For int (n = 1; n<strIn.Length;n++)
{
        strMid = substring(strIn, n, 1)
        Select Case strMid.charCodeAt(0)
        Case 192 To 197:
            strMid = "A"
        Case 198:
            strMid = "AE"
        Case 199:
            strMid = "C"
        Case 200 To 203:
            strMid = "E"
        Case 204 To 207:
            strMid = "I"
        Case 208:
            strMid = "D"
        Case 209:
            strMid = "N"
        Case 210 To 214, 216:
            strMid = "O"
        Case 215:
            strMid = "x"
        Case 217 To 220:
            strMid = "U"
        Case 221:
            strMid = "Y"
        Case 222, 254:
            strMid = "p"
        Case 223:
            strMid = "B"
        Case 224 To 229:
            strMid = "a"
        Case 230:
            strMid = "ae"
        Case 231:
            strMid = "c"
        Case 232 To 235:
            strMid = "e"
        Case 236 To 239:
            strMid = "i"
        Case 240, 242 To 246, 248:
            strMid = "o"
        Case 241:
            strMid = "n"
        Case 249 To 252:
            strMid = "u"
        Case 253, 255:
            strMid = "y"

        Englishizer = Englishizer + strMid;
}
}
0

Source: https://habr.com/ru/post/1788628/


All Articles