Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Replacing foreign alphabet letters by English alphabet letters

    Dear Statalisters,

    I would like to replace foreign alphabet letters by English alphabet letters in my dataset. I have 5 variables and the observations are all string variables written in Foreign alphabet.
    I am using the commands below. However, I am getting this error message : "invalid syntax".

    Code:
    local wrongVowels "ệ ê ũ à ã â Đ ư ơ ò ì ợ ớ ị ỳ ủ ẩ ú ọ ô ổ á ấ ằ ằ ả ắ ạ ữ "
    local correctVowels "e e u a a a D u o o i o o i y u a u o o o a a a a a a a u"
    local nVowels : word count("`wrongVowels'")
    
    levelsof district, local(distobserv)
    
    * For each variable, replace wrong characters with correct/simplified ones
    foreach l of `distobserv' {
    forvalues i = 1/`nVowels' {
    local wrongVowel `:word `i' of `wrongVowels''
    local correctVowel `:word `i' of `correctVowels''
    replace `l' = subinstr(`l',"`wrongVowel'" ,"`correctVowel'" ,.)
    }
    }
    It looks like I am writing " local wrongVowel `:word `i' of `wrongVowels'' " in a wrong way.

    Which codes should I run, and how can I run them?

    Thank you in advance for your help
    Marina
    Last edited by Marina Ngoma; 14 Sep 2018, 09:22.

  • #2
    No, actually the problem is with
    Code:
    foreach l of `distobserv' {
    which should be:
    Code:
    foreach l of local distobserve { // N.B.  NO QUOTES
    As for
    Code:
    local wrongVowel `:word `i' of `wrongVowels''
    local correctVowel `:word `i' of `correctVowels''
    they can be simplified, but they are correct and will work properly as they are. So let's just leave them alone.

    There may be another problem. Your local macro distobserve is created by -levelsof district-. Now you subsequently use the contents of distobserve as if it is a list of variable names. So this is only possible if the values of the variable district are actually the names of other variables in your data set. That may be the case, but it is somewhat unusual. If it is not, then you will still get error messages from this code. In that case, I recommend that you post back with an example of your data and also explain in greater detail just what you want to accomplish.

    In the future, when showing data examples, please use the -dataex- command to do so. If you are running version 15.1 or a fully updated version 14.2, it is already part of your official Stata installation. If not, run -ssc install dataex- to get it. Either way, run -help dataex- to read the simple instructions for using it. -dataex- will save you time; it is easier and quicker than typing out tables. It includes complete information about aspects of the data that are often critical to answering your question but cannot be seen from tabular displays or screenshots. It also makes it possible for those who want to help you to create a faithful representation of your example to try out their code, which in turn makes it more likely that their answer will actually work in your data.

    When asking for help with code, always show example data. When showing example data, always use -dataex-.

    Comment


    • #3
      Thank you for your help, Clyde.

      Please find below the example data.
      What I would like to do is replacing every single Foreign letter by an English letter, for each observation.
      For example, I would like
      "Đình Trám" to be "Dinh Tram",
      "Bắc Giang" to be "Bac Giang",
      "Hòa Bình" to be "Hoa Binh"


      Code:
      * Example generated by -dataex-. To install: ssc install dataex
      clear
      input str61 ip str22 tinh str81 district
      "Đình Trám"                                                  "Bắc Giang"   "huyện Việt Yên"                                                              
      "Quang Châu"                                                   "Bắc Giang"   "huyện Việt Yên"                                                              
      "Song Khê - Nội Hoàng"                                      "Bắc Giang"   "huyện Yên Dũng"                                                              
      "Bờ trái sông Đà"                                         "Hòa Bình"    "Tp Hòa Bình"                                                                    
      "Mông Hoá"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
      "Yên Quang"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
      "Lạc Thịnh"                                                 "Hòa Bình"    "huyện Yên Thủy"                                                              
      "Thuỵ Vân (gđ1,2&3)"                                        "Phú Thọ"    "Tp Việt Trì"                                                                  
      "Trung Hà"                                                     "Phú Thọ"    "huyện Thanh Thủy"                                                            
      "Cẩm Khê"                                                    "Phú Thọ"    "huyện Cẩm Khê"                                                              
      "Phú Hà"                                                      "Phú Thọ"    "thị xã Phú Thọ"                                                            
      "Quế Võ II"                                                  "Bắc Ninh"    "huyện Quế Võ"                                                                
      "Hanaka"                                                        "Bắc Ninh"    "TX. Từ Sơn"                                                                    
      "VSIP Bắc Ninh"                                               "Bắc Ninh"    "TX Từ Sơn"                                                                    
      "Thuận Thành 2"                                              "Bắc Ninh"    "huyenj Thuận Thành"                                                            
      "Quế Võ III"                                                 "Bắc Ninh"    "huyện Quế Võ"                                                                
      "Khánh Phú"                                                   "Ninh Bình"    "huyện Yên Khánh"                                                              
      "Gián Khẩu"                                                  "Ninh Bình"    "huyện Gia Viễn"                                                              
      "Tam Điệp 1"                                                 "Ninh Bình"    "huyện Tam Điệp"                                                              
      "Phúc Sơn"                                                    "Ninh Bình"    "Tp Ninh Bình"                                                                    
      "Khánh Cư"                                                    "Ninh Bình"    "huyện Yên Khánh"                                                              
      "Cái Lân+Cái Lân mở rộng"                               "Quảng Ninh"  "Tp Hạ Long"                                                                    
      "Hải Yên"                                                    "Quảng Ninh"  "Tp Móng Cái"                                                                    
      end
      Many thanks

      Comment


      • #4
        I am sure that there is an easier way to do this using regular expressions, but my experience with this is very limited. The resulting output reveals that your dictionary is not comprehensive, so you will need to expand it.

        Code:
        * Example generated by -dataex-. To install: ssc install dataex
        clear
        input str61 ip str22 tinh str81 district
        "Đình Trám"                                                  "Bắc Giang"   "huyện Việt Yên"                                                              
        "Quang Châu"                                                   "Bắc Giang"   "huyện Việt Yên"                                                              
        "Song Khê - Nội Hoàng"                                      "Bắc Giang"   "huyện Yên Dũng"                                                              
        "Bờ trái sông Đà"                                         "Hòa Bình"    "Tp Hòa Bình"                                                                    
        "Mông Hoá"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
        "Yên Quang"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
        "Lạc Thịnh"                                                 "Hòa Bình"    "huyện Yên Thủy"                                                              
        "Thuỵ Vân (gđ1,2&3)"                                        "Phú Thọ"    "Tp Việt Trì"                                                                  
        "Trung Hà"                                                     "Phú Thọ"    "huyện Thanh Thủy"                                                            
        "Cẩm Khê"                                                    "Phú Thọ"    "huyện Cẩm Khê"                                                              
        "Phú Hà"                                                      "Phú Thọ"    "thị xã Phú Thọ"                                                            
        "Quế Võ II"                                                  "Bắc Ninh"    "huyện Quế Võ"                                                                
        "Hanaka"                                                        "Bắc Ninh"    "TX. Từ Sơn"                                                                    
        "VSIP Bắc Ninh"                                               "Bắc Ninh"    "TX Từ Sơn"                                                                    
        "Thuận Thành 2"                                              "Bắc Ninh"    "huyenj Thuận Thành"                                                            
        "Quế Võ III"                                                 "Bắc Ninh"    "huyện Quế Võ"                                                                
        "Khánh Phú"                                                   "Ninh Bình"    "huyện Yên Khánh"                                                              
        "Gián Khẩu"                                                  "Ninh Bình"    "huyện Gia Viễn"                                                              
        "Tam Điệp 1"                                                 "Ninh Bình"    "huyện Tam Điệp"                                                              
        "Phúc Sơn"                                                    "Ninh Bình"    "Tp Ninh Bình"                                                                    
        "Khánh Cư"                                                    "Ninh Bình"    "huyện Yên Khánh"                                                              
        "Cái Lân+Cái Lân mở rộng"                               "Quảng Ninh"  "Tp Hạ Long"                                                                    
        "Hải Yên"                                                    "Quảng Ninh"  "Tp Móng Cái"                                                                    
        end
        
        
        local wrongVowels "ệ ê ũ à ã â Đ ư ơ ò ì ợ ớ ị ỳ ủ ẩ ú ọ ô ổ á ấ ằ ằ ả ắ ạ ữ"
        local correctVowels "e e u a a a D u o o i o o i y u a u o o o a a a a a a a u"
        local n: word count `wrongVowels'
        gen ip2=ip
        forval i= 1/`n'{
        local v1: word `i' of `wrongVowels'
        local v2: word `i' of `correctVowels'
        replace ip2=ustrregexrf(ip2,"`v1'","`v2'")
        }
        Code:
        . l ip ip2, clean
        
                                    ip                       ip2  
          1.                 Đình Trám                 Dinh Tram  
          2.                Quang Châu                Quang Chau  
          3.      Song Khê - Nội Hoàng      Song Khe - Nội Hoang  
          4.           Bờ trái sông Đà           Bờ trai song Da  
          5.                  Mông Hoá                  Mong Hoa  
          6.                 Yên Quang                 Yen Quang  
          7.                 Lạc Thịnh                 Lac Thinh  
          8.        Thuỵ Vân (gđ1,2&3)        Thuỵ Van (gđ1,2&3)  
          9.                  Trung Hà                  Trung Ha  
         10.                   Cẩm Khê                   Cam Khe  
         11.                    Phú Hà                    Phu Ha  
         12.                 Quế Võ II                 Quế Võ II  
         13.                    Hanaka                    Hanaka  
         14.             VSIP Bắc Ninh             VSIP Bac Ninh  
         15.             Thuận Thành 2             Thuận Thanh 2  
         16.                Quế Võ III                Quế Võ III  
         17.                 Khánh Phú                 Khanh Phu  
         18.                 Gián Khẩu                 Gian Khau  
         19.                Tam Điệp 1                Tam Diep 1  
         20.                  Phúc Sơn                  Phuc Son  
         21.                  Khánh Cư                  Khanh Cu  
         22.   Cái Lân+Cái Lân mở rộng   Cai Lan+Cái Lân mở rộng  
         23.                   Hải Yên                   Hai Yen

        Comment


        • #5
          You can use the ustrto() function to remove accents from letters and leave only ASCII characters. This may remove more characters than wanted so you may have to replace those with suitable equivalents:

          Code:
          * Example generated by -dataex-. To install: ssc install dataex
          clear
          input str61 ip str22 tinh str81 district
          "Đình Trám"                                                  "Bắc Giang"   "huyện Việt Yên"                                                              
          "Quang Châu"                                                   "Bắc Giang"   "huyện Việt Yên"                                                              
          "Song Khê - Nội Hoàng"                                      "Bắc Giang"   "huyện Yên Dũng"                                                              
          "Bờ trái sông Đà"                                         "Hòa Bình"    "Tp Hòa Bình"                                                                    
          "Mông Hoá"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
          "Yên Quang"                                                    "Hòa Bình"    "huyện Kỳ Sơn"                                                                
          "Lạc Thịnh"                                                 "Hòa Bình"    "huyện Yên Thủy"                                                              
          "Thuỵ Vân (gđ1,2&3)"                                        "Phú Thọ"    "Tp Việt Trì"                                                                  
          "Trung Hà"                                                     "Phú Thọ"    "huyện Thanh Thủy"                                                            
          "Cẩm Khê"                                                    "Phú Thọ"    "huyện Cẩm Khê"                                                              
          "Phú Hà"                                                      "Phú Thọ"    "thị xã Phú Thọ"                                                            
          "Quế Võ II"                                                  "Bắc Ninh"    "huyện Quế Võ"                                                                
          "Hanaka"                                                        "Bắc Ninh"    "TX. Từ Sơn"                                                                    
          "VSIP Bắc Ninh"                                               "Bắc Ninh"    "TX Từ Sơn"                                                                    
          "Thuận Thành 2"                                              "Bắc Ninh"    "huyenj Thuận Thành"                                                            
          "Quế Võ III"                                                 "Bắc Ninh"    "huyện Quế Võ"                                                                
          "Khánh Phú"                                                   "Ninh Bình"    "huyện Yên Khánh"                                                              
          "Gián Khẩu"                                                  "Ninh Bình"    "huyện Gia Viễn"                                                              
          "Tam Điệp 1"                                                 "Ninh Bình"    "huyện Tam Điệp"                                                              
          "Phúc Sơn"                                                    "Ninh Bình"    "Tp Ninh Bình"                                                                    
          "Khánh Cư"                                                    "Ninh Bình"    "huyện Yên Khánh"                                                              
          "Cái Lân+Cái Lân mở rộng"                               "Quảng Ninh"  "Tp Hạ Long"                                                                    
          "Hải Yên"                                                    "Quảng Ninh"  "Tp Móng Cái"                                                                    
          end
          
          gen ip2 = usubinstr(ip,"Đ","D",.)
          replace ip2 = ustrto(ustrnormalize(ip2, "nfd"), "ascii", 2)
          list ip ip2
          and the results
          Code:
          . list ip ip2
          
               +---------------------------------------------------+
               |                      ip                       ip2 |
               |---------------------------------------------------|
            1. |               Đình Trám                 Dinh Tram |
            2. |              Quang Châu                Quang Chau |
            3. |    Song Khê - Nội Hoàng      Song Khe - Noi Hoang |
            4. |         Bờ trái sông Đà           Bo trai song Da |
            5. |                Mông Hoá                  Mong Hoa |
               |---------------------------------------------------|
            6. |               Yên Quang                 Yen Quang |
            7. |               Lạc Thịnh                 Lac Thinh |
            8. |      Thuỵ Vân (gđ1,2&3)         Thuy Van (g1,2&3) |
            9. |                Trung Hà                  Trung Ha |
           10. |                 Cẩm Khê                   Cam Khe |
               |---------------------------------------------------|
           11. |                  Phú Hà                    Phu Ha |
           12. |               Quế Võ II                 Que Vo II |
           13. |                  Hanaka                    Hanaka |
           14. |           VSIP Bắc Ninh             VSIP Bac Ninh |
           15. |           Thuận Thành 2             Thuan Thanh 2 |
               |---------------------------------------------------|
           16. |              Quế Võ III                Que Vo III |
           17. |               Khánh Phú                 Khanh Phu |
           18. |               Gián Khẩu                 Gian Khau |
           19. |              Tam Điệp 1                Tam Diep 1 |
           20. |                Phúc Sơn                  Phuc Son |
               |---------------------------------------------------|
           21. |                Khánh Cư                  Khanh Cu |
           22. | Cái Lân+Cái Lân mở rộng   Cai Lan+Cai Lan mo rong |
           23. |                 Hải Yên                   Hai Yen |
               +---------------------------------------------------+
          
          .

          Comment


          • #6
            Thanks much, Andrew.
            I expanded the dictionary and it worked well.

            Comment


            • #7
              Thank you, Robert.

              Comment


              • #8
                Originally posted by Robert Picard View Post
                You can use the ustrto() function to remove accents from letters and leave only ASCII characters. This may remove more characters than wanted so you may have to replace those with suitable equivalents:

                Code:
                * Example generated by -dataex-. To install: ssc install dataex
                clear
                input str61 ip str22 tinh str81 district
                "Đình Trám" "Bắc Giang" "huyện Việt Yên"
                "Quang Châu" "Bắc Giang" "huyện Việt Yên"
                "Song Khê - Nội Hoàng" "Bắc Giang" "huyện Yên Dũng"
                "Bờ trái sông Đà" "Hòa Bình" "Tp Hòa Bình"
                "Mông Hoá" "Hòa Bình" "huyện Kỳ Sơn"
                "Yên Quang" "Hòa Bình" "huyện Kỳ Sơn"
                "Lạc Thịnh" "Hòa Bình" "huyện Yên Thủy"
                "Thuỵ Vân (gđ1,2&3)" "Phú Thọ" "Tp Việt Trì"
                "Trung Hà" "Phú Thọ" "huyện Thanh Thủy"
                "Cẩm Khê" "Phú Thọ" "huyện Cẩm Khê"
                "Phú Hà" "Phú Thọ" "thị xã Phú Thọ"
                "Quế Võ II" "Bắc Ninh" "huyện Quế Võ"
                "Hanaka" "Bắc Ninh" "TX. Từ Sơn"
                "VSIP Bắc Ninh" "Bắc Ninh" "TX Từ Sơn"
                "Thuận Thành 2" "Bắc Ninh" "huyenj Thuận Thành"
                "Quế Võ III" "Bắc Ninh" "huyện Quế Võ"
                "Khánh Phú" "Ninh Bình" "huyện Yên Khánh"
                "Gián Khẩu" "Ninh Bình" "huyện Gia Viễn"
                "Tam Điệp 1" "Ninh Bình" "huyện Tam Điệp"
                "Phúc Sơn" "Ninh Bình" "Tp Ninh Bình"
                "Khánh Cư" "Ninh Bình" "huyện Yên Khánh"
                "Cái Lân+Cái Lân mở rộng" "Quảng Ninh" "Tp Hạ Long"
                "Hải Yên" "Quảng Ninh" "Tp Móng Cái"
                end
                
                gen ip2 = usubinstr(ip,"Đ","D",.)
                replace ip2 = ustrto(ustrnormalize(ip2, "nfd"), "ascii", 2)
                list ip ip2
                and the results
                Code:
                . list ip ip2
                
                +---------------------------------------------------+
                | ip ip2 |
                |---------------------------------------------------|
                1. | Đình Trám Dinh Tram |
                2. | Quang Châu Quang Chau |
                3. | Song Khê - Nội Hoàng Song Khe - Noi Hoang |
                4. | Bờ trái sông Đà Bo trai song Da |
                5. | Mông Hoá Mong Hoa |
                |---------------------------------------------------|
                6. | Yên Quang Yen Quang |
                7. | Lạc Thịnh Lac Thinh |
                8. | Thuỵ Vân (gđ1,2&3) Thuy Van (g1,2&3) |
                9. | Trung Hà Trung Ha |
                10. | Cẩm Khê Cam Khe |
                |---------------------------------------------------|
                11. | Phú Hà Phu Ha |
                12. | Quế Võ II Que Vo II |
                13. | Hanaka Hanaka |
                14. | VSIP Bắc Ninh VSIP Bac Ninh |
                15. | Thuận Thành 2 Thuan Thanh 2 |
                |---------------------------------------------------|
                16. | Quế Võ III Que Vo III |
                17. | Khánh Phú Khanh Phu |
                18. | Gián Khẩu Gian Khau |
                19. | Tam Điệp 1 Tam Diep 1 |
                20. | Phúc Sơn Phuc Son |
                |---------------------------------------------------|
                21. | Khánh Cư Khanh Cu |
                22. | Cái Lân+Cái Lân mở rộng Cai Lan+Cai Lan mo rong |
                23. | Hải Yên Hai Yen |
                +---------------------------------------------------+
                
                .
                Hello, Robert.

                I also the problem with Vietnamese characters, too. I am using Stata 17. And the .dta file is quite old. When I open it, it looks like below:

                V�n �i�n
                �� Gia D�ng
                Thu�c Nam, Thu�c B�c
                D�t Qu� V�ng
                L�ng Ngh� B�t Tr�ng
                Kim L�n
                Ngh� May
                G� H�n
                B�n Ph� ��
                D�t Th�n Tri�u Kh�c
                H�u T�
                N�u R��u
                Thanh Kh�c
                M�y Tre �an Th�n 3

                Could you show me how to encode those to normal Vietnamese characters like your example above?
                "Đình Trám" "Bắc Giang" "huyện Việt Yên" "Quang Châu" "Bắc Giang" "huyện Việt Yên" "Song Khê - Nội Hoàng" "Bắc Giang" "huyện Yên Dũng" "Bờ trái sông Đà" "Hòa Bình" "Tp Hòa Bình" "Mông Hoá" "Hòa Bình" "huyện Kỳ Sơn" "Yên Quang" "Hòa Bình" "huyện Kỳ Sơn" "Lạc Thịnh" Thank you for reading my question!

                I am looking forward hearing from you soon.

                Chinh Thon

                Comment


                • #9
                  Originally posted by Thon Hoang View Post
                  . . . the .dta file is quite old.

                  . . . Could you show me how to encode those to normal Vietnamese characters . . .?
                  Just a guess, but it's possible that the old .dta file was created using a local pseudo-ANSI encoding that allows Vietnamese characters to be represented without double bytes, analogous to what "Shift-JIS" local encoding did for Japanese characters.

                  Try converting that old .dta dataset file into a modern Unicode-encoded Stata dataset. Your version of Stata (Release 17) is recent enough to do that.

                  Consult the help file for translating encodings:
                  Code:
                  help unicode_translate
                  Follow the instructions in that help file in order to convert that old .dta Stata dataset file into a modern Unicode .dta Stata dataset.

                  Again, just a guess, but if it's correct, then that should convert the old encoding into normal Vietnamese characters (Unicode) and make the dataset usable.

                  Comment


                  • #10
                    Dear Conveney,
                    Thank you for your immediate response.
                    I leant and applied unicode translate, but I fail to convert the string variable to normal Vietnamese characters.
                    I might be that the character encoding which is being used in the original .dta file is very important.
                    Because we must use unicode encoding set command before use unicode translate command.
                    I tried to use unicode encoding set latin1 and ISO-8859-1. But I failed.

                    Could you show me how to know the encoding set of my string variable:
                    activities
                    V�n �i�n
                    �� Gia D�ng
                    Thu�c Nam, Thu�c B�c
                    D�t Qu� V�ng
                    L�ng Ngh� B�t Tr�ng
                    Kim L�n
                    Ngh� May
                    G� H�n
                    B�n Ph� ��
                    D�t Th�n Tri�u Kh�c
                    H�u T�
                    N�u R��u
                    Thanh Kh�c
                    M�y Tre �an Th�n 3

                    Thank you for helping me!

                    Best Regards,
                    Chinh Thon

                    Comment


                    • #11
                      Originally posted by Thon Hoang View Post
                      I tried to use unicode encoding set latin1 and ISO-8859-1. But I failed.
                      There are apparently several old ANSI-like encodings that were used for Vietnamese, but I think that neither of those that you mention is among them.

                      Have you tried the suggestions in the unicode translate help file? At Stata's command line, type
                      Code:
                      help unicode translate
                      and scroll down to the section that's titled How to determine the extended ASCII encoding and follow the suggestions in order to determine the possibility to try.

                      This help file also points to a further help file titled help encodings for additional and more specific advice on how to determine the old encoding. You can do a text search for "vietnamese" in order to see one such suggestion.

                      If you can attach the dataset, then I can try to see which encoding was used, but I cannot guarantee success.
                      Last edited by Joseph Coveney; 16 Apr 2024, 05:38.

                      Comment


                      • #12
                        Thank you, Coveney!
                        According to your suggestion, I used the commands:
                        unicode encoding alias windows-1258 or ibm-5354 or ibm-5354_P100-1998,
                        unicode translate "filename.dta"

                        However, it does not solve my problem.
                        Then I found the other way to solve the problem.
                        First, exporting data from Stata to csv file.
                        After exporting to csv, the string variable like below
                        V�n �i�n
                        �� Gia D�ng
                        Thu�c Nam, Thu�c B�c
                        D�t Qu� V�ng
                        L�ng Ngh� B�t Tr�ng
                        Kim L�n
                        Ngh� May
                        G� H�n
                        B�n Ph� ��
                        D�t Th�n Tri�u Kh�c
                        H�u T�
                        N�u R��u
                        Thanh Kh�c
                        M�y Tre �an Th�n 3

                        to become
                        V©n §iÒn
                        §å Gia Dông
                        D¸t Quú Vµng
                        Lµng NghÒ B¸t Trµng
                        Kim L©n
                        Thuèc Nam, Thuèc B¾c
                        Gß Hµn
                        Bón Phó §«
                        NghÒ May
                        Thanh Khóc
                        M©y Tre §an Th«n 3

                        Second, using Python to translate into normal Vietnamese characters by a dictionary which I create using the suggestion in https://stackoverflow.com/questions/...unicode-string.
                        Then I got the readable text:
                        Vân Điền
                        Đồ Gia Dụng
                        Dát Quỳ Vàng
                        Làng Nghề Bát Tràng
                        Kim Lân
                        Thuốc Nam, Thuốc Bắc
                        Gò Hàn
                        Bún Phú Đô
                        Nghề May
                        Thanh Khúc
                        Mây Tre Đan Thôn 3
                        The dictionary in Python is:
                        TCVN_dic={'µ':'à', '¸':'á', '¶':'ả', '·':'ã', '¹':'ạ',
                        '¨':'ă', '»':'ằ', '¾':'ắ', '¼':'ẳ', '½':'ẵ', 'Æ':'ặ',
                        '©':'â', 'Ç':'ầ', 'Ê':'ấ', 'È':'ẩ', 'É':'ẫ', 'Ë':'ậ',
                        '®':'đ', 'Ì':'è', 'Ð':'é', 'Î':'ẻ', 'Ï':'ẽ', 'Ñ':'ẹ',
                        'ª':'ê', 'Ò':'ề', 'Õ':'ế', 'Ó':'ể', 'Ô':'ễ', 'Ö':'ệ',
                        '×':'ì', 'Ý':'í', 'Ø':'ỉ', 'Ü':'ĩ', 'Þ':'ị',
                        'ß':'ò', 'ã':'ó', 'á':'ỏ', 'â':'õ', 'ä':'ọ',
                        '«':'ô', 'å':'ồ', 'è':'ố', 'æ':'ổ', 'ç':'ỗ', 'é':'ộ',
                        '¬':'ơ', 'ê':'ờ', 'í':'ớ', 'ë':'ở', 'ì':'ỡ', 'î':'ợ',
                        'ï':'ù', 'ó':'ú', 'ñ':'ủ', 'ò':'ũ', 'ô':'ụ',
                        '*':'ư', 'õ':'ừ', 'ø':'ứ', 'ö':'ử', '÷':'ữ', 'ù':'ự',
                        'ú':'ỳ', 'ý':'ý', 'û':'ỷ', 'ü':'ỹ', 'þ':'ỵ',
                        '¡':'Ă', '¢':'Â', '§':'Đ', '£':'Ê', '¤':'Ô', '¥':'Ơ', '¦':'Ư'}

                        Comment

                        Working...
                        X