<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://community.activestate.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>ActiveState Community Site - Default charset ignored when opening a file? - Comments</title>
 <link>http://community.activestate.com/forum-topic/default-charset-ignored-when-opening-file</link>
 <description>Comments for &quot;Default charset ignored when opening a file?&quot;</description>
 <language>en</language>
<item>
 <title>File Properties</title>
 <link>http://community.activestate.com/forum-topic/default-charset-ignored-when-opening-file#comment-4442</link>
 <description>&lt;p&gt;First, I would suggest trying the 4.3 beta and see if you have the same issue.&lt;/p&gt;
&lt;p&gt;Does changing the encoding in the file properties work?  If not, can you create a bug on bugs.activestate.com, and attach a zipped file that we can test against?&lt;/p&gt;
</description>
 <pubDate>Wed, 05 Mar 2008 18:25:27 -0800</pubDate>
 <dc:creator>shanec</dc:creator>
 <guid isPermaLink="false">comment 4442 at http://community.activestate.com</guid>
</item>
<item>
 <title>On Default Charset and Auto-Detect</title>
 <link>http://community.activestate.com/forum-topic/default-charset-ignored-when-opening-file#comment-4430</link>
 <description>&lt;p&gt;After a few tests, my reckoning is that:&lt;/p&gt;
&lt;p&gt;1. Default Charset is only for creating new files. Opening files don&#039;t use this parameter, it&#039;s only managed through Auto-Detect (and possible exceptions to Auto-Detect as seen in the Internationalization options). Right?&lt;/p&gt;
&lt;p&gt;2. Auto-Detect didn&#039;t work in my case because the file is not valid UTF-8. Some editors wouldn&#039;t open the file because of that. I opened it with Firefox, set the encoding as UTF-8, cut &#039;n pasted the result in Komodo and saved that as UTF-8. I get a file that has 35 more bytes than the original one. And now it opens ok in those editors, and Komodo recognizes it as UTF-8.&lt;/p&gt;
&lt;p&gt;So that problem is solved (why I get an invalid dump is another problem ^_^;). I think my related remarks are still valid though. :)&lt;/p&gt;
</description>
 <pubDate>Wed, 05 Mar 2008 10:53:22 -0800</pubDate>
 <dc:creator>Florent V.</dc:creator>
 <guid isPermaLink="false">comment 4430 at http://community.activestate.com</guid>
</item>
<item>
 <title>Default charset ignored when opening a file?</title>
 <link>http://community.activestate.com/forum-topic/default-charset-ignored-when-opening-file</link>
 <description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Today I tried opening a 1.3 MB text file, actually a MySQL database dump with a .sql extension. The content is UTF-8, but it was recognized as Latin-1.&lt;/p&gt;
&lt;p&gt;So I went to the preferences, and tried to ask for UTF-8 by default and to disable Auto-Detect. Didn&#039;t work. I tried maybe six or seven configurations, restarted Komodo Edit (4.2.1) each time, and I always got Latin-1 in the end. Duh.&lt;/p&gt;
&lt;p&gt;I tried setting Language-specific Default Encoding as &quot;UTF-8&quot; for SQL, but it didn&#039;t work either.&lt;/p&gt;
&lt;p&gt;So in the end I can&#039;t get Komodo Edit to recognize the file encoding as UTF-8, even though the file [i]is[/i] UTF-8, the system encoding is UTF-8 too, etc.&lt;/p&gt;
&lt;p&gt;And I can&#039;t use Current File Settings to set the encoding as &quot;UTF-8&quot;, because that would only change mess the data when I save the file, instead of reinterpreting the file with a different encoding. It would go like this:&lt;/p&gt;
&lt;p&gt;1. UTF-8 file is opened. Let&#039;s say it contains a &quot;Ã©&quot; character.&lt;br /&gt;
2. Komodo Edit thinks the file is Latin-1. It prints &quot;ÃƒÂ©&quot; in the editor.&lt;br /&gt;
3. I go to Current File Settings and change file charset from &quot;Latin-1/ISO-8859-1&quot; to &quot;UTF-8&quot;.&lt;br /&gt;
4. Display is not affected. Komodo still prints &quot;ÃƒÂ©&quot;.&lt;br /&gt;
5. I save the file. &quot;ÃƒÂ©&quot; gets saved as UTF-8 data. So all my data is corrupted.&lt;/p&gt;
&lt;p&gt;Is there a way to tell Komodo Edit to reinterpret a file with a different encoding? If not, shouldn&#039;t that be an option in Current File Settings, or simply a Â«ViewÂ» menu option like in Firefox (best tool for guessing what a file&#039;s real encoding is, save for hex editors)?&lt;/p&gt;
&lt;p&gt;I could open the file in Firefox, tell Firefox it&#039;s UTF-8 (in case it choose something else), and then copy-paste the result into Komodo with file encoding set as UTF-8. That would work, but I&#039;m not sure copypasting 1.3 MB of unicode text is such a good idea. And It&#039;s only a really small database. Imagine the pain with a 40 MB database dump...&lt;/p&gt;
&lt;p&gt;So... did I miss something? Or is it that:&lt;br /&gt;
- Auto-Detect is broken and&lt;br /&gt;
- there is no &quot;Reinterpret file as &amp;lt;charset&amp;gt;&quot; feature in Komodo?&lt;/p&gt;
</description>
 <comments>http://community.activestate.com/forum-topic/default-charset-ignored-when-opening-file#comments</comments>
 <category domain="http://community.activestate.com/forums/komodo-support-0">Komodo support</category>
 <category domain="http://community.activestate.com/os/debian-ubuntu">Debian / Ubuntu</category>
 <pubDate>Wed, 05 Mar 2008 09:59:43 -0800</pubDate>
 <dc:creator>Florent V.</dc:creator>
 <guid isPermaLink="false">2009 at http://community.activestate.com</guid>
</item>
</channel>
</rss>
