Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > PHP

Reply
 
LinkBack Thread Tools
Old April 17th, 2009, 05:30 PM   #1
New Member
 

Join Date: Apr 2009
Location: Jerusalem
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 aooga is on a distinguished road
Problem with HTML Textbox and Hebrew with ? or :

When I create a textbox to enter data into a database (and then display it back to me), if I write a ? after a word and then a space the ? shows up on the wrong side. Similar things with colon etc. Are there any more robust textboxes I can use instead of the stand input ones, or any other workaround? any free solutions? I suppose the ideal would be a simple and free rich text form. If I could get the gmail compose email form on my site that'd be great, it's a really robust form which works very well with right to left languages.
aooga is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 17th, 2009, 05:45 PM   #2
WebForumz Admin Badge
SuperMember
 
Marc's Avatar
 

Join Date: Apr 2007
Location: Scotland, UK
Posts: 2,086
Thanks: 2
Thanked 23 Times in 23 Posts
Rep Altering Power: 89 Marc is just really nice Marc is just really nice Marc is just really nice Marc is just really nice
Re: Problem with HTML Textbox and Hebrew with ? or :

I don't understand how this can be happening... Can we see the relevant sections of your code?
__________________
Regards
Marc
Administrator - Webforumz.com

Web Design and Development Blog - Marc Fraser
Marc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 17th, 2009, 05:49 PM   #3
New Member
 

Join Date: Apr 2009
Location: Jerusalem
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 aooga is on a distinguished road
Re: Problem with HTML Textbox and Hebrew with ? or :

http://hypermegaultra.com/editQuestions.php?#602
Note the ? at the begging of the sentence instead of the end.
aooga is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 17th, 2009, 05:52 PM   #4
WebForumz Admin Badge
SuperMember
 
Marc's Avatar
 

Join Date: Apr 2007
Location: Scotland, UK
Posts: 2,086
Thanks: 2
Thanked 23 Times in 23 Posts
Rep Altering Power: 89 Marc is just really nice Marc is just really nice Marc is just really nice Marc is just really nice
Re: Problem with HTML Textbox and Hebrew with ? or :

What format is your database in? The database will be reading the data in form left-to-right, instead of right-to-left.
__________________
Regards
Marc
Administrator - Webforumz.com

Web Design and Development Blog - Marc Fraser
Marc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 17th, 2009, 06:00 PM   #5
WebForumz Admin Badge
SuperMember
 
Marc's Avatar
 

Join Date: Apr 2007
Location: Scotland, UK
Posts: 2,086
Thanks: 2
Thanked 23 Times in 23 Posts
Rep Altering Power: 89 Marc is just really nice Marc is just really nice Marc is just really nice Marc is just really nice
Re: Problem with HTML Textbox and Hebrew with ? or :

I've found some useful info;

Quote:
Originally Posted by http://www.mail-archive.com/linux-il@cs.huji.ac.il/msg53379.html
1. The table needs to be UTF-8.

2. The connection with the DB needs to be UTF-8 (it is preferred to have
this set as default in my.cnf).

3. PHP must send UTF-8 data in the MySQL query: If the text you enter is
hardcoded inside the PHP code, then the PHP file, as you edit it in your
text editor, must be saved with the UTF-8 encoding. If the data comes from
an external application that talks to PHP and submits data via GET/POST,
then it must do so in UTF-8 as well. And finally, if your text comes from a
web form that the user enters, the web page that contains the web form
itself, must be UTF-8, so the browser sends the data as UTF-8. The latter is
the most well-known "trouble maker" for the problem you're facing; It is
easily solved by adding the meta tag: <meta http-equiv='Content-type'
content="text/html; charset=utf-8" />. Also make sure that your web server
does not force a different encoding via HTTP headers; Apache started doing
it at some version in the past, with the AddDefaultCharset directive.
This may help you, if you haven't already done this.
__________________
Regards
Marc
Administrator - Webforumz.com

Web Design and Development Blog - Marc Fraser
Marc is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old April 17th, 2009, 06:10 PM   #6
New Member
 

Join Date: Apr 2009
Location: Jerusalem
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 aooga is on a distinguished road
Re: Problem with HTML Textbox and Hebrew with ? or :

Thanks. However, I think the problem begins before the database. For instance, if you go onto:
http://hypermegaultra.com/newQuestio...xtQuestion=593
If you have hebrew letters installed, typing into the textbox gives the following error, even before any data is submitted to the database: type a word and then a '?', the '?' is put all the way on the right, until the next letter (not the next space), when it is put back on the left. So the database IS accurately reflecting what the textbox displayed, it's just that the standard textbox doesn't put the '?' where I want it to go. Basically, I need the textbox to know that even when I type in '?' or any other language neutral symbol, I still want it to be hebrew, i.e. go on the left and not the right.

Last edited by aooga; April 17th, 2009 at 06:13 PM..
aooga is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Background CSS problem and Small HTML problem Stormraven Your Design and Layout 5 July 16th, 2008 10:59 AM
invoke small html page or window on textbox after f9 key press aavvii JavaScript 5 November 23rd, 2006 05:43 PM
Problem to add text to the textbox flexed JavaScript 1 August 21st, 2006 02:43 AM
Firefox CSS problem with hebrew (works ok on IE) offco HTML, XHTML and CSS 6 August 5th, 2006 01:06 PM
TextBox problem accessman Databases 1 October 14th, 2005 09:19 PM


Search Engine Optimization by vBSEO 3.2.0 RC8