NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
[resolved] Tools -> Integration - UTF-8 encoding


Joined: 28 Dec 2006
Posts: 63
Reply with quote
Hi

i have suc ha problem

i add a tool like:

@php5@ -f C:\test.php

and in this text.php
i have such a line:

$text = file_get_contents('php://stdin');
echo $text;


in editor i select text like:

"mąka"

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

instead of
"mąka"

i tried using iconv and mbsting functions, and ut8_decode, utf8_encode and no correct result

what is the problem ?

tom
View user's profileFind all posts by amoorekSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I think there are no problems with utf8 but with interpreting what you get.
What you get as "mÄ…ka" (more than 4bytes) is a correct UTF-8 string, just store it into an utf-8 encoded HTML (with approriate meta and charset) and you'll see it as "mąka" (4bytes)

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


Joined: 28 Dec 2006
Posts: 63
Reply with quote
Hmmm....

I tried and this is the same.
I created HTML file, set up the meta utf-8 content
and i select text and then after applying the command it changes to this form with bad characters.

This is important for me because this is great tool here and if i cant do that correctly with my special utf-8 characters it becomes useless this way Sad
I tried many things and no results.

Tom
View user's profileFind all posts by amoorekSend private message


Joined: 07 Mar 2007
Posts: 44
Location: Lithuania
Reply with quote
Dmitri is right, also check in Tools->Settings->IDE->IDE settings that Default file encoding is UTF-8, should work Wink.

Btw, as much as I'm using phpEd, none of UTF-8 problems do I experience.

Bye Wink
View user's profileFind all posts by thunder-ltuSend private messageVisit poster's website


Joined: 28 Dec 2006
Posts: 63
Reply with quote
hmm....

i was trying many things
BU now i realized that the script used in integration command was not encoded in UTF-8
i created that with notepad2 and it was default ANSI
and i was lookin in my project and problem was with the script itself

thanks for all you help

now this is fantastic to have such a thing in PHPED Smile

tom
View user's profileFind all posts by amoorekSend private message


Joined: 07 Mar 2007
Posts: 44
Location: Lithuania
Reply with quote
Very good then Smile, I was experiencing such problems also before long time...
Bye Wink
View user's profileFind all posts by thunder-ltuSend private messageVisit poster's website


Joined: 29 Sep 2006
Posts: 3
Location: Istanbul, Turkey
Reply with quote
I wrote some character in UTF8 with dreamweaver without any prb. If I try to open with phpED I can't see what I wrote.
Tools->Settings->IDE->IDE settings that Default file encoding is UTF-8
tools->Setting->Editors->Appearance->????? which one should I select to see UTF8 characters

Thanks for helps.
Kadir
View user's profileFind all posts by KadirErturkSend private messageMSN Messenger


Joined: 07 Mar 2007
Posts: 44
Location: Lithuania
Reply with quote
Default Smile. Maybe these UTF problems you are experiencing, are being caused by BOM record... :/
View user's profileFind all posts by thunder-ltuSend private messageVisit poster's website


Joined: 29 Sep 2006
Posts: 3
Location: Istanbul, Turkey
Reply with quote
BOM record??? (Sorry I don't know what is this Sad )
View user's profileFind all posts by KadirErturkSend private messageMSN Messenger
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
when you open your file using File->Open, please check if encoding is utf-8
In v5.0 you can change encoding on the fly (right click on it in the status bar)

_________________
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
Still I have probs with UTF-8

Eg. result of string "ąśćłóń" is "ąśćłóń". Script file set in itegration works ok (with utf-8 etc.) and probs is only via inserting text again into editor (result string has BOM record - after script run, not earlier). How schould I set it correctly ?


Last edited by intro on Sat Jun 16, 2007 5:43 am; edited 1 time in total

_________________
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
Btw. everywhere here I have set up UTF-8 for files and IDE, so this part of settings isn't a reason.

_________________
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 1 of 2  

  
  
 Reply to topic