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 174047 - Localized php source code files don't load properly at application startup
Summary: Localized php source code files don't load properly at application startup
Status: RESOLVED WORKSFORME
Alias: None
Product: platform
Classification: Unclassified
Component: Text (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: mslama
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-08 09:06 UTC by jllamasaspa
Modified: 2009-12-15 06:19 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
This is one file that produces the effect described by my report just in case it can be useful. (1.02 KB, text/plain)
2009-10-08 09:15 UTC, jllamasaspa
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jllamasaspa 2009-10-08 09:06:28 UTC
Environment:
============
I'm using "NetBeans IDE Dev (Build 200908022240)".

I'm coding on PHP and I'm using the PHP set.

My PHP files have a header (comment) that contains localized text (iso-8859-15) my project is setup as iso8859-15 (same).

Problem description:
====================
When I leave some files open on the IDE and close it, when I open it again those files appear with "national character
corruption".

If I close the files and open them again they appear properly, it's just on this "automatic" opening that they don't
show up properly my national characters.

Expected results:
=================
Files should show properly my national characters as they do when I open the file manually.

Current Results:
================
files show corruption if they are automatically opened but show properly if they are opened by me (double click or
file-->open)
Comment 1 jllamasaspa 2009-10-08 09:15:02 UTC
Created attachment 89076 [details]
This is one file that produces the effect described by my report just in case it can be useful.
Comment 2 Ivan Sidorkin 2009-10-11 20:00:16 UTC
reassigned to editor for evaluation
Comment 3 Vitezslav Stejskal 2009-10-13 15:50:55 UTC
IMO this is a race condition. The files in the editor are loaded *before* FileEncodingQuery returns something sensible
from the project these files belong to.
Comment 4 mslama 2009-12-03 05:48:45 UTC
Is it reproducible with latest dev build? I cannot reproduce it. At least when I added logging to DataEditorSupport.loadFromStreamToKit FileEncodingQuery.getEncoding returns expected encoding value. 

I have simple test php project, I set project encoding to windows-1253, restarted IDE with one php file opened in editor and logged what encoding is returned from FileEncodingQuery.getEncoding.

If it is reproducible with your sample project please can you send it to me? If I cannot reproduce it but you can I can send you patched DataEditorSupport with some logging enabled to see what happens.
Comment 5 jllamasaspa 2009-12-03 12:34:38 UTC
I've reviewed this issue with build number 6.8RC1.
About screen reports: Product Version: NetBeans IDE 6.8 RC1 (Build 091129-unknown-revn)

And I've not been able to reproduce it.

So for some reason I would consider it fixed or simply that I've not been able to reproduce it (tried it with several files).

But the encoding I'm using on those files is 8859-15 (just informative).
Comment 6 mslama 2009-12-15 06:19:53 UTC
Closing.