473,378 Members | 1,462 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

set text while english and persian is together

oranoos3000
107 100+
hi
i have an forum that user can insert your question or answer
i d like to user can insert english or persian (persian is a unicode character or farsi character)character
but problem is not this
my problem is that while i fetch this text from database
place of text character is changed
you see result of this on
http://www.infoiran.ir
thanks alot
Nov 17 '09 #1
3 2941
Atli
5,058 Expert 4TB
Hey.

What do you mean by: "place of text character is changed"?
I can't really see a problem with the Persian text the page that you posted. It looks fine to me. Not that I actually know how the Persian text is supposed to look like.
Nov 17 '09 #2
oranoos3000
107 100+
hi
for example i insert a persian text and then insert english sequent and arragement . i d like to user can insert persian text and english text together
when i save this text to database this text is saved correctly
but when i fetch this text from database and i d like to show this text to page
this text is distured and place of persian text and english text is disturbed
thanks alot
Nov 21 '09 #3
Atli
5,058 Expert 4TB
I'm still not following.

It sounds to me like you want to use both Persian and English text together, but have both align correctly. Meaning; English from left to right, and Persian from right to left.

Is that it?

HTML allows two attributes: lang and dir.
"lang" defines the language in which the contents of the tag is written in, while "dir" defines the direction of the text ("rtl" or "ltr").

So, you could do:
Expand|Select|Wrap|Line Numbers
  1. <p lang="en" dir="ltr">
  2.    Some English text
  3. </p>
  4. <p lang="fa" dir="rtl">
  5.     Some Persian text. Farsi, as I understand it is called.
  6. </p>
The first block would be rendered from left-to-right using English fonts, while the bottom block would be rendered right-to-left using fonts tailored to Persian.
I understand there are some rendering differences between them and the Arabic fonts. This helps the browser decide which to use.

Not sure if this is exactly a solution to your problem tho.
If it is not, please explain in more detail. Perhaps you could show us example code? Maybe the HTML output of the page that is not being displayed correctly.
Nov 21 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: ASP Developers | last post by:
Persian ( Farsi ) Weblog for ASP Developers : http://asp.persianblog.com
18
by: OrenFlekser | last post by:
Hi I've posted this message couple of days ago, but I can't find it now, so sorry if you see it twice... Anyways - I have a text box, and I want my users to be able to write only in english...
0
by: Ehsan Sadeghi | last post by:
Hello Can anyone tell me how to load document which is writen in Persian language onto a dialog base application and be able to control every character of the document. for example the program...
5
by: adam.waterfield | last post by:
Hi guys, I know this is a really basic problem, but I am buggered if I can remember or find the soultion to it. I have the two text boxes on a form, both of which a user enters a number. I...
0
by: Steve | last post by:
Microsoft has introduced a Persian Calendar Class in ASP.net 2.0 http://msdn2.microsoft.com/en-us/library/system.globalization.persiancalendar.aspx I have looked at the methods and the only way...
0
by: mahmoodi | last post by:
hi i installed ferret and acts_as_ferret successfully. but my Persian character search has not correct result. my code: acts_as_ferret :fields => , :analyzer =>...
0
by: mmrz | last post by:
I have added the NLS_CALENDAR = Persian at Registry. There is a problem with the first day of first month of each year.For example when I enter 13730101 or 13860101,... on the date field with Date...
0
by: JosAH | last post by:
Greetings, Introduction At the end of the last Compiler article part I stated that I wanted to write about text processing. I had no idea what exactly to talk about; until my wife commanded...
6
by: Ole Nielsby | last post by:
Does C++ have a method of retrieving this? When launching my app, I want to select the appropriate language for ts GUI, based on the user's language setting. The frameworks wxWidgets and...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.