SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Encoding problem (shift_jis)

    I have a page that shows fine in my browser: http://cheers-sendai.com/index.php. It's in Japanese and it uses 'shift_jis'. When I view the source, I can read the Japanese OK, but when I put it in a text editor to edit it, the characters are all messed up - it's unreadable. That obviously makes it difficult (actually, impossible) to edit. How can I fix this?
    It was originally written in Dreamweaver if that helps...

    Thanks for any help.

  2. #2
    SitePoint Addict dbr's Avatar
    Join Date
    Aug 2006
    Location
    Tucked away in the mountains...
    Posts
    228
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    just some thoughts...

    Is it readable in notepad when you view source using IE browser? If so, why not edit it in notepad?
    What text editor are you attempting to put it into for editing?
    If it were origionally written in DW, then you might want to edit it with DW...

    Just some thoughts...

    Good Luck,

    Dave
    "Three components make an entrepreneur:
    the person, the idea, and the resources to make it happen."
    Anita Roddick ~British entrepreneur
    dbr founder of: ProximityCast.com

  3. #3
    bronze trophy
    Join Date
    Dec 2004
    Location
    Sweden
    Posts
    2,670
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, the editor in question has to support shift_jis.

    Otherwise you might be able to edit the page in the browser, setting document.body.contentEditable="true" for IE/Safari/Opera, or document.designMode="on" for Moz.

    Otherwise you use iconv or some other tool to convert the file to utf-8 or some other supported encoding.
    Simon Pieters

  4. #4
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Dave,
    No, it's not readable when I view the source in Notepad from IE.
    I thought about using Dreamweaver myself - in fact, I installed it especially for this - but I get the same problem. I figured there's probably a setting somewhere to sort it out. Ichanged the default encoding and the font seetings, but that didn't fix the problem.

    Simon,
    Thanks for the ideas, I'll try them.

  5. #5
    Robert Wellock silver trophybronze trophy xhtmlcoder's Avatar
    Join Date
    Apr 2002
    Location
    A Maze of Twisty Little Passages
    Posts
    6,316
    Mentioned
    60 Post(s)
    Tagged
    0 Thread(s)
    Are you are actually copy and pasting the text and have you set your system locale to Japanese and the OS must support double-byte fonts.

    I think DW usually only saves in UTF-8 if it actually contains the characters and obviously you can find that out using the Modify > Page Properties Ctrl+J

  6. #6
    Winemaster bronze trophy BonRouge's Avatar
    Join Date
    Oct 2004
    Location
    Sendai, Japan
    Posts
    2,417
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey,
    I downloaded EmEditor and when I opened my files, the text was readable.
    I appreciate the help.


Bookmarks

Posting Permissions

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