HighDots Forums  

Re: Dreamweaver CS4 Japanese encoding bug?

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Re: Dreamweaver CS4 Japanese encoding bug? in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ChrisBank
 
Posts: n/a

Default Re: Dreamweaver CS4 Japanese encoding bug? - 03-24-2009 , 01:00 PM






For JavaScript files there is no special way to say in the file what the
encoding is. For formats like HTML, XML, and CSS there's someway to specify the
charset of the file in the file itself. Since there is no direct way to tell
with JavaScript files Dreamweaver usually falls back to the default encoding
specified in the New Document preferences panel.

There are two exceptions for UTF-8. The first is if you saved your file with a
Unicode Signature (BOM) which adds three hidden bytes to the start of your file
and signals this file is always UTF-8 no matter what else is in it. The other
case is non-ascii UTF-8 characters like those in Japanese or European accent
characters. The UTF-8 encoding is pretty distinct for non-ascii characters so
when Dreamweaver sees non-ascii characters that look like UTF-8 it assumes the
file is UTF-8.

In your case it looks like the file has only ASCII characters in them so the
default encoding was used. This doesn't really matter since all encodings treat
ASCII characters the same way, it's only when you start using Japanese or
European accents that the encoding really matter.


Reply With Quote
  #2  
Old   
DeadManWalking
 
Posts: n/a

Default Re: Dreamweaver CS4 Japanese encoding bug? - 03-24-2009 , 09:10 PM






Chris,
Thank you for the input.
[q]Originally posted by: ChrisBank
For JavaScript files there is no special way to say in the file what the
encoding is. For formats like HTML, XML, and CSS there's someway to specify the
charset of the file in the file itself. Since there is no direct way to tell
with JavaScript files Dreamweaver usually falls back to the default encoding
specified in the New Document preferences panel.
[/q]
Actually, there is a way. As I mentioned in my initial post, there is an
encoding indicator in the bottom-right corner of the edit screen. This is same
for the JavaScript files too. And you can actually change the encoding of JS
files by:
clicking [Modify] menu and select [Page Properties]

[q]Originally posted by: ChrisBank
There are two exceptions for UTF-8. The first is if you saved your file with a
Unicode Signature (BOM) which adds three hidden bytes to the start of your file
and signals this file is always UTF-8 no matter what else is in it. The other
case is non-ascii UTF-8 characters like those in Japanese or European accent
characters. The UTF-8 encoding is pretty distinct for non-ascii characters so
when Dreamweaver sees non-ascii characters that look like UTF-8 it assumes the
file is UTF-8.

In your case it looks like the file has only ASCII characters in them so the
default encoding was used. This doesn't really matter since all encodings treat
ASCII characters the same way, it's only when you start using Japanese or
European accents that the encoding really matter.[/q]
This information helped my problem. When I save the document with BOM
signature, forcing it to be UTF8 -no mater what-, the problem has solved.

But again, as I stated few times in my posts, my default encoding is set to
UTF8, so even if Dreamweaver making assumptions, the default should be UTF8, no?

Probably DW is thinking "Hey! this guy's system is Japanese, so I should
ignore the DW settings and set this to SJIS".

Anyway, I guess my problem has solved now, but I still think this is a "small"
bug.

Thanks a lot.




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.