MZ is ready to change Unicode

Python converter နဲ့ ပြောင်းတာ အဆင်မပြေတာနဲ့ ကိုယ့်ဘာသာ ရေးထားတဲ့ PHP ကို ပြန်စမ်းကြည့်ဖို့ စဉ်းစားထားတာ ကြာပြီ။ MZ ကို ပြောင်းဖို့ ကြည့်လိုက်တော့ နောက်ပိုင်းရေးထားတဲ့စာတွေက Latin မှာသွားသိမ်းထားတာ ࿽ လိုမျိုး ပုံစံတွေနဲ့ ဆိုတော့ PHP code နဲ့က အဆင်မပြေဘူး။ ကို ရာဗီ ကိုတော့ ပြောင်းတာ error တက်တာ ပြောထားသေးတယ်။ ဒေါက်တာ ကာဘွန် ရေးထားပေးတဲ့ java converter နဲ့တော့ မစမ်းရသေးဘူး။

MZ database က 500 MB လောက် ရှိတယ်။ ဒါကြောင့် ပြောင်းရခက်နေတာ။ Unicode ပြောင်းတာနဲ့ အတူတူ vanilla ကိုလည်း ပြောင်းမှာဆိုတော့ Vanilla ကို export လုပ်လိုက်တယ်။ file size က 200 MB လောက်ပဲ ရှိတော့တယ်။ အဲဒီ sql ကို ကိုရာဗီ ရဲ့ python နဲ့ ပြောင်းတာလည်း မရဘူး။ ဒါနဲ့ မနေ့က လေယာဉ်ပျံ ပေါ်မှာ php converter ကို ထပ်ပြီး update လုပ်ပြီး ရေးလိုက်တယ်။ အဓိက ပြဿနာက memory ပဲ။ ဒါနဲ့ *nix အဓိက ဆင်းပြီး shell script ရေးရင်း ကောင်းမလားလို့ တောင် စဉ်းစားသေးတယ်။ shell script ဆိုတာနဲ့ ဘာကို သွားစဉ်းစားမိလဲဆိုတော့ cat နဲ့ > filename ကို သွား သတိရတယ်။ cat ကတော့ *nix တွေမှာ file read တဲ့ အနေနဲ့ ခေါ်ပြီး php zg_cli.php > output.txt ဆိုရင် output အနေနဲ့ file write သွားပေးတယ်။ php က file write တာ မဟုတ်ပဲ os က သွား write ပေးတာ ဖြစ်တော့ နည်းနည်း ပိုမှန်တယ်။

လက်ရှိ ၂ မျိုးရေးထားတယ်။ windows တွေအတွက်ကတော့ file read တဲ့ အခါမှာ တစ်ကြောင်းဆီကို read ခိုင်းလိုက်တယ်။ အဲဒီတော့ memory သိပ် မသုံးတော့ဘူး။ အရင်တုန်းက ရေးထားတာထက် အများကြီး ပိုမြန်သွားတယ်။ *nix OS တွေအတွက်ကတော့ cat ကို file read ဖို့အတွက် သုံးလိုက်တယ်။ အဲဒါက ရိုးရိုး PHP file read တဲ့ဟာထက်တော့ အများကြီးမြန်တယ်။ နှစ်ခုလုံးကို > output.ext နဲ့ ပဲ file output ထုတ်လိုက်တယ်။ လေယာဉ်ပေါ်မှာ ရေးပြီးတော့ convert စမ်းကြည့်တာ အဆင်ပြေတယ်။ ࿽ တွေလည်း UTF-8 အနေနဲ့ ပြောင်းလိုက်တော့ အဆင်ပြေတယ်။ တစ်ခုပဲလိုတာက php.ini မှာ utf-8 support လုပ်အောင် config တော့ လုပ်ပေးရတယ်။ လေယာဉ်ပေါ်မှာ ရေးပြီးတော့ convert ပြောင်းကြည့်တာ အကုန် ??? တွေ ဖြစ်ကုန်တယ်။ အစက ဘာကြောင့်မှန်းမသိ။ နောက်မှ သတိရမိတာ php.ini မှာ utf-8 support မလုပ်ထားလို့ ဖြစ်မယ်ဆိုပြီး iso code ကို utf-8 ပြောင်းပေးလိုက်တော့ အဆင်ပြေသွားတယ်။ လေယာဉ်ကတော့ ၃ နာရီ စီးရတယ်။ လေယာဉ်တက်တာနဲ့ ဘာနဲ့ ဆိုတော့ တကယ်တန်း ရေးချိန်ကတော့ ၂ နာရီခွဲလောက်ပဲ ရတယ်။ လေယာဉ်ပေါ်မှာ ထမင်းစားပြီးချိန် ကတည်းက ရေးလိုက်တာတော့ ခဏလေးပဲ။ အရင်တုန်းက mysqluf8 converter ကြောင့်လည်း ပါမယ်။ ရွာပတ်သွားတာက php.ini မှာ utf-8 support လုပ်အောင် ပြင်ပေးရမယ်ဆိုတာ မသိလိုက်တာပဲ။ ?? တွေ ပြောင်းကုန်လို့ code မှားနေလားဆိုပြီး စမ်းနေသေးတာ။ အချိန် တော်တော် ကြာသွားတယ်။ ဘာပဲ ပြောပြော ဒီတစ်ခေါက် လေယာဉ်မှာ အချိန်ကုန်တာ မြန်တယ်လို့ ဆိုရမယ်။ ဘယ်လိုလို ရန်ကုန် ပြန်ရောက်သွားမှန်းတောင် မသိလိုက်ဘူး။ MZ site တစ်ခုလုံး UTF-8 လည်း ပြောင်းလို့ ပြီးသွားရော ရန်ကုန် လေယာဉ်ကွင်းမှာ ဆိုက်ဖို့အတွက် ကြေငြာနေပြီ။ အခုတော့ အကုန် အဆင်သင့်ဖြစ်နေပြီ။ MZ ကို unicode ပြောင်းဖို့ မြန်မာ နှစ်သစ်ကူး ကို စောင့်နေတာ။

MZ အသစ်က unicode + vanilla ဖြစ်လိမ့်မယ်။ အရင် username , password တွေ အတိုင်းပဲ။ အဲ.. ရေးထားတဲ့ code ကို ရန်ကုန်ရောက်တော့ github ပေါ်မှာ push လုပ်ဖို့ ကြိုးစားတော့ ssh က မဖွင့်ထားပေးဘူးပဲ။ စလုံး ပြန်ရောက်မှပဲ converter source code ကို ပြန်တင်ပေးတော့မယ်။ အခြားလူတွေလည်း ဒေါက်တာ ကာဘွန် ရဲ့ java converter ကို စမ်းကြည့်စေချင်တယ်။ မဆိုးဘူး။ သူလည်း တော်တော်မြန်တယ်။ file size အကြီးကြီးတော့ အခုထက်ထိ မစမ်းရသေးဘူး။ စလုံး ပြန်ရောက်မှပဲ စမ်းကြည့်တော့မယ်။

10 Comments

  1. luthitlaypar says:

    Sorry, I change my browser font to Myanmar3 can read your site very well but now I can’t type anymore myanmar font. Why? please reply me. May be there have many reason. I install key magic.

  2. MMSane says:

    Brother,
    php.ini မှာ utf-8 support လုပ်အောင် config တော့ လုပ်ပေးရတယ်။ လေယာဉ်ပေါ်မှာ ရေးပြီးတော့ convert ပြောင်းကြည့်တာ အကုန် ??? တွေ ဖြစ်ကုန်တယ်။ အစက ဘာကြောင့်မှန်းမသိ။ နောက်မှ သတိရမိတာ php.ini မှာ utf-8 support မလုပ်ထားလို့ ဖြစ်မယ်ဆိုပြီး iso code ကို utf-8 ပြောင်းပေးလိုက်တော့ အဆင်ပြေသွားတယ်။
    —————————————————–
    U mean that is.. or not please reply me ? I have a problem about this.
    In Php.ini

    default_charset = “iso-8859-1”
    change into ->

    default_charset = “utf-8”

    1. saturngod says:

      yes … I changed

      default_charset = “utf-8”
      mbstring.internal_encoding = UTF-8

      in php.ini

      1. MMSane says:

        Thanks ko saturn!…

  3. thetnaung87 says:

    ကျွန်တော် ဒီ site မှာ font တွေ မမြင်ရဘူး ဖြစ်နေတယ်။ myanmar tutorial တို့မှာ မြင်ရပြီးတော့ ဒီ site မှာ မမြင်ရဘူး။ unicode font တွေလည်း install သွင်းထားပါတယ်။ နောက်ပြီး မေးချင်တာ တစ်ခုက website မှာတော့ zawgyi to unicode embeded ရှိတာတွေ့ရတယ်။ ကျွန်တော်တို့ window တွေမှာရော zawgyi to unicode ပြောင်းတဲ့ sowftware ရှိလားမသိဘူး။ ကျွန်တော် icon name တွေကအစ unicode ပြောင်းသုံးချင်ပြီ။ အဲလိုမျိုး အလွယ်တကူပြောင်းလို့ရတဲ့ software ရှိရင်ပြောပြပေးပါဦး။

    1. saturngod says:

      What font are you install ? Are you install Yunghkio ? Are you open from Chrome ? If you are using chrome, you need Yunghkio font.

  4. thetnaung87 says:

    I install all unicode font that is get from myanmar tutorials. nu…don`t see yet..You have many question reply? pls..tell me possiboties..

    1. saturngod says:

      1. Are you install masterpiece on windows ? I think , you may have masterpiece on windows and you can’t see my site. So, check Masterpiece font in font directory or not.

      2. If you are using mac, you need to insall Masterpiece.

      1. thetnaung87 says:

        I had masterpiece in font folder, so i can`t see. now I see font on ur blog, when masterpiece font was delete.thank u very much.

        1. saturngod says:

          are you using mac ? are you install Yunghkio or other unicode font ?

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.