WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] utf-8 encoding and asian characters (6 posts)

  1. flush
    Member
    Posted 7 years ago #

    Hi,
    When I type in Korean characters via the WordPress interface to create posts, catrgoties, links, etc it all works fine.
    But when I change text inside the php files (stuff like "email required", etc) it then appears broken once online, unless I switch my browser to Korean encoding, but then all the Korean entered via wordpress appears broken because I'm no longer in utf-8.
    Why can't I change text directly in the php files. Should I manually encode the files in utf-8 after I edited them?
    Thanks

  2. moshu
    Member
    Posted 7 years ago #

    Why can't I change text directly in the php files.

    Actually, you can. Just make sure you are using a text editor that has utf-8 support! The problem you described appears when your editor saves the files with "Korean" encoding instead of utf-8 encoding.
    In better text editors you can choose which encoding to use when save a file.

  3. flush
    Member
    Posted 7 years ago #

    I use Notepad++, which surely has the option but I didn't specify utf-8 encoding as the output format, I realize after checking that it was set on ANSI encoding.
    So you confirm that's where the pb must have come from?

  4. moshu
    Member
    Posted 7 years ago #

    So you confirm that's where the pb must have come from?

    Yes, 200% :)
    You are not the first one with such an issue, and every time the solution suggested above worked.

  5. cam_oai
    Member
    Posted 7 years ago #

    what about this prob:
    i use utf-8 and it works OK to display in "wordpress", but i created a popup window for print-friendly version AND F(/#ยค/# the chars displays wrong. i put the <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> but i doesn't help..so i need to change encoding in firefox everytime i print that out..

    firefox or html?

  6. cam_oai
    Member
    Posted 7 years ago #

    i think i found the solution...and u don't have to change or mix with mysql.

    on the top of the top of the page. u just need to add:
    header('Content-type: text/html; charset=utf-8');

    the browser will translate/force to use utf-8

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.