www.webdeveloper.com
Results 1 to 5 of 5

Thread: Issue with Bulgarian Characters

  1. #1
    Join Date
    Sep 2004
    Location
    Sri Lanka
    Posts
    473

    Question Issue with Bulgarian Characters

    Hi,

    I have to develop an application with support for Bulgarian language. Actually it will need to display both English and Bulgarian languages in same page.

    Accordingly I set the page's encoding to utf-8. Also passed utf-8 header.

    Then for language files, I created a separate include include file for each language. Language file is containig an associative array of keys and values. With the use of an function I set it to get language values (depending on $_GET or set $_SESSION parameters) and put them in relevant locations in main page.

    That works, however it is not showing actual Bulgarian characters. Instead it shows question marks.

    I saved all files in UTF-8 and when opened in text editor, I see actual characters.

    I do appreciate if someone please guide me to the write track for solving this.

    Thanks and Best Regards

  2. #2
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,536
    How are you setting the UTF-8 character set header? I like to cover both options:
    PHP Code:
    <?php
    header
    ('Content-Type: text/html; charset=UTF-8');
    ?>
    <!DOCTYPE html>
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  3. #3
    Join Date
    Sep 2004
    Location
    Sri Lanka
    Posts
    473
    Thanks NogDog , I did the both, but output had no difference. I ll post the code samples asap.

  4. #4
    Join Date
    Aug 2004
    Location
    Ankh-Morpork
    Posts
    19,536
    Oh, one other thing: if you are using htmlspecialchars() or htmlentities() functions, be sure to include the optional parameter to specify the encoding is UTF-8.
    "Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
    ~ Terry Pratchett in Nation

    eBookworm.us

  5. #5
    Join Date
    Sep 2004
    Location
    Sri Lanka
    Posts
    473
    Thanks again.

    I havent use those functions.

    Here you can see the page at http://tinyurl.com/ngajcvl.

    See question marks in header section with a book icon.

    I ve also attached files.

    bglang.zip

    Thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles