Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Formatted text
18/01/2009
18:12
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

hello everyone,

In the grid I have a field that's connected to a TEXT MySQL field which I want to save also formatted text with characters like òàùèì and carriage returns.... is there maybe a parameter or something in the code that should allow to save them?....

Thanks to everyone!

Ciao,

Luigi

19/01/2009
11:19
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Use edittype:textarea when you edit the field.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

20/01/2009
15:34
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello tony and everyone,

well I settled textarea and I'm using simple post with mysql_query and INSERT INTO. Plus I settled default_charset = "iso-8859-1" in php.ini but when I save to database and I look inside the database with phpmyadmin I see the text lost those characters like òàìèù....

Maybe shall I need to use a different charset as default_charset? or could be that echo "<cell><![CDATA[". $row["offerta"]."]]></cell>"; where I should maybe use something different than CDATA? or some other parameters that I don't know?....

Thanks again to everyone!

Ciao!

Luigi

22/01/2009
09:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

When you post data to the server maybe you should send custom headers with iso-8859-1 encoding. See in jQuery docs how to do that - hint you can use beforeSend parameter in the ajax call.

Regards

Tony

P.S. Using CDATA is good idea, but do not forget to use the header function in PHP before sending the data to the grid.

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

04/02/2009
07:28
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello tony!

Sorry to reply so late but I was hardly busy...anyway I figured out about those letters òàùèéì and now I read them OK but seems it doesn't save/read correctly the carriage return character... maybe the iso-8859-1 encoding doesn't support it?....

Thanks
Ciao
Luigi

09/02/2009
14:51
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello tony,

as you know, iso-8859-1 should save also carriage return characters?....because I see correctly those letters àòùèéì but when I go in a new line, it shows right next the point like new line character wasn't saved...

Thanks,

Luigi

11/02/2009
00:08
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Sorry I do not understand what you try to explain me

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

11/02/2009
02:29
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello tony,

I mean when you write something, then go in a new line, then write something again...then in the front it should appear as like I wrote but it shows as like it is in the same line...

So I am asking if maybe ISO-8859-1 doesn't support new-line-characters (like that \\n in C++'s printf)?...

Thanks,

Luigi

Example:

I write in the grid text field:

"I eat an apple.

I eat an apple."

On the front it shows as like:

"I eat an apple. I eat an apple."

14/02/2009
06:55
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

No one knows the answer about my question on ISO-8859-1 and new line characters?...

Thanks...

Luigi

15/02/2009
05:42
Avatar
Luigino
Member
Members
Forum Posts: 47
Member Since:
25/10/2008
sp_UserOfflineSmall Offline

Hello everyone....

for who has problems with characters like àòèéùì, just set everything as UTF-8 and database as UTF8_UNICODE_CI, plus if you have a database field with text datatype then when echoing the content of that fields, use nl2br(fieldname[index]); to convert those \\n into html's <br/.

Thanks anyway!

See ya! 🙂

Luigi

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
51 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information