This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 197609 - Problem with other encodings than UTF8
Summary: Problem with other encodings than UTF8
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Smarty (show other bugs)
Version: 7.0
Hardware: All All
: P2 normal with 5 votes (vote)
Assignee: Martin Fousek
URL:
Keywords:
: 197615 199661 200185 200508 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-11 09:25 UTC by kamilchojnacki
Modified: 2011-09-06 10:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kamilchojnacki 2011-04-11 09:25:22 UTC
I have problem with encoding in smarty templates in Netbeans 7 RC 2. I have project in ISO-8859-2, but Netbeans save files in UTF-8.

I don't have any warnings.

Greetings
Kamil
Comment 1 padys 2011-04-14 05:42:58 UTC
*** Bug 197615 has been marked as a duplicate of this bug. ***
Comment 2 kamiln 2011-05-17 08:13:21 UTC
I also have this problem it is annoying because I have some projects not in UTF-8 but in ISO-8859-2
Comment 3 kamiln 2011-05-20 08:09:54 UTC
I use netbeans 7.0 problem exists when you open file in other encoding everything looks ok, but when you save it it saves in other encoding propably in UTF-8
and then opening again the file and charackers which are nor standard are broken, I have to turn off thsi plugin to work with netbeans
Comment 4 kamilchojnacki 2011-05-20 08:20:54 UTC
I've contacted with author of this plugin. He said that other encodings are not implemented yet...
Comment 5 Martin Fousek 2011-06-02 06:47:05 UTC
From user aoglib:
> When the plugin is ON I can't work, because of in the text often found of
> Cyrillic characters and even files encoded in 1251. I have nothing against the
> UTF8, however, the majority of projects supported me in 1251. Therefore, there
> is a huge, critical issue. I must disable this plugin to work with files.
> Please, fix this problem

I'm increasing priority to P2.
Comment 6 nosegrind 2011-06-15 17:32:18 UTC
Same problem for me since upgraded to NB 7. Projects in ISO-8859-1, after saving, tpl files are converted to UTF8, specials chars are broken. I have to disable the plugin too...
Comment 7 Martin Fousek 2011-07-16 23:28:46 UTC
*** Bug 200185 has been marked as a duplicate of this bug. ***
Comment 8 Martin Fousek 2011-07-16 23:29:02 UTC
*** Bug 199661 has been marked as a duplicate of this bug. ***
Comment 9 Martin Fousek 2011-07-16 23:36:30 UTC
OK, should be fixed by this changset:
http://hg.netbeans.org/main/contrib/rev/b160e2055090

I used encoding support from HTML, since it should be very similar to TPL templates. 

So if you will have any charset specified (according to html specification) in the header of the .tpl file it will be stored according to this charset. If there will not be anything specified the project charset will be used. So you have to have correct encoding set in in project properties of your PHP project.

BTW, can anybody try that and verify in the dev versions of netbeans/smarty plugins. It's implemented in version 1.56 (should be available on dev UC on Monday/Tuesday). Thanks.
Comment 10 nosegrind 2011-07-21 11:33:25 UTC
(In reply to comment #9)
> OK, should be fixed by this changset:
> http://hg.netbeans.org/main/contrib/rev/b160e2055090
> 
> I used encoding support from HTML, since it should be very similar to TPL
> templates. 
> 
> So if you will have any charset specified (according to html specification) in
> the header of the .tpl file it will be stored according to this charset. If
> there will not be anything specified the project charset will be used. So you
> have to have correct encoding set in in project properties of your PHP project.
> 
> BTW, can anybody try that and verify in the dev versions of netbeans/smarty
> plugins. It's implemented in version 1.56 (should be available on dev UC on
> Monday/Tuesday). Thanks.

Hi, i've just installed the 1.57 version.
Tested and approved, works fine. (Encoding set in project properties).
I can re-use this (very usefull) plugin now. Thanks for the update.
Comment 11 Martin Fousek 2011-07-21 12:25:27 UTC
Good to know, thanks.
Comment 12 Quality Engineering 2011-08-27 14:16:00 UTC
Integrated into 'main-golden'
Changeset: http://hg.netbeans.org/main-golden/rev/f61845b35af7
User: Martin Fousek <marfous@netbeans.org>
Log: #197609 - Problem with other encodings than UTF8
Comment 13 Martin Fousek 2011-09-02 11:20:10 UTC
*** Bug 200508 has been marked as a duplicate of this bug. ***