NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
...

in editor i select text like:

"mąka"

and in the results i get
"mÄ…ka"


Its a the same effect like changing encoding from Utf8 to Windows-1250. Here in poland, windows-1250 is main window's encoding. So I found (dont know how its look in other system's encoding) that inserting string parsed by itegrated script is encoded by system settings (not PhpED's).

If I set up my file as windows-1250 encoding, there are no probs with integrated scripts (and its never mind of PhpEd settings - never mind if integrated script has other encoding or the same, project's encoding or ide default encoding - its never mind).

But if I set up my file as utf8 (or other than system's encoding) ... parsed string is replaced in editor all time with windows-1250 encoding, not utf8 or other (its reading system's encoding?)...

Something is really strange here. Dmitri, what do You say about that ?

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
My current working settings (not as I want, but it works):

In integration options:

Command Line: @php5@ -f "script_path" "@FName@"
+ work with editor
+ take input from: whole file
This without "return result to editor" - its turned off!
+ Auto refresh editor

Integrated script:

<?
$string = @file_get_contents($_SERVER['argv'][1]);
mb_internal_encoding('UTF-8'); // this isnt really needed, but better is here to use multi byte string operations (if needed)
// some operations with string, eg.:
$string = mb_strtolower($string);
file_put_contents($_SERVER['argv'][1],$string);
?>

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
Quote:
in editor i select text like:

"mąka"

and in the results i get
"mÄ…ka"


Its a the same effect like changing encoding from Utf8 to Windows-1250.

Did you try to run your script without the IDE to check its output?

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
Yes dmitri. Ive tryed and everything with script is ok.

Also now my script taking input and put it into file by file_put_contents and in editor file is refreshing.

So I think there are probs only with inputing results into editor as result of script. How it is done in PhpED ?

I think that result of script is incorrectly copied into clipboard where encoding is changing from utf-8 to windows-1250 and then its pasted from clipboard into editor ? Right Dmitri ?

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
no, clipboard is not used at all.
I'll check what's up there a bit later.

_________________
The PHP IDE team
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Veteran

Joined: 06 Mar 2007
Posts: 158
Location: Poland
Reply with quote
If not clipboard that something else at this stage, when the result of script is pasted into editor (string is converted into windows-1250 and later pasted again as utf-8 into editor? - when checked option: "Return results into editor").

So again: If my eg. html file is saved with windows-1250 and i run any script on it (even if script is encoded with utf8 or ide's settings are set as utf8 default encoding) result's string is pasted without any changes (probs) - all ok. But if my eg. html file is not saved with windows-1250 encoding, there are probs with it.

_________________
ML
View user's profileFind all posts by introSend private messageVisit poster's website
[resolved] Tools -> Integration - UTF-8 encoding
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 2 of 2  

  
  
 Reply to topic