Chinese, Japanese Font Issues With Mail
Can anyone provide me the simplest working solution to send mails in a
multilingual website
that too with no issues relating to display of characters, as of now I
have find a solution which is
working quite well, which is to paste a japanese or chinese lang.
sentences to an editor like
dreamweaver in design mode and paste the generated char code eg. #1045
to the database table
to create a mail template, this is working fine but a labour job. Can
you provide me with a more
intelligent solution? such as by setting the charSet or something else
as of I am using the phpmailer class for the purpose...
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Inserting Japanese And Chinese Characters Into MySQL Database
I have a PHP file that takes form input (first and last name) and inserts them into a MySQL database (running MySQL 4.1.12-log). The MySQL default character set for the database is UTF-8 Unicode (utf8) and the collation is utf8_general_ci. The table I am inserting the data into is MyISAM and has a collation of latin1_swedish_ci. The table already has a bunch of records in it. I just got a request to allow for Japanese and Chinese characters to be collected in the database (in the first and last name fields). I ran the query "SHOW CHARACTER SET;" from phpMyAdmin and none of the character sets appear to support Japanese or Chinese characters. I did some research on my own and I found out that there are some Japanese and Chinese character sets out there. Mainly, it looks like big5, gb2312, gbk for Chinese and ujis and sjis for Japanese. Would I need to have these character sets added to my MySQL installation (in the config file)? Is it possible to keep the same table and allow for users to enter either English, Japanese, or Chinese characters and have them all captured properly into my database table? If so, how? I found a Convert() and Cast() function in MySQL. Would I have to use these? Please help. Anyone have experience with this? I would rather not have to create a new table just for Japanese/Chinese characters. I would love to be able to collect English, Japanese, and Chinese characters all in the same table. Is this possible? Thanks in advance. Is there any PHP function that might help with this and do I need to add a meta charset tag within the HEAD tag of my PHP page?
Japanese Character Problem In Mail Subject Line
I am having a problem with the display of Japanese character in the subject line of the mails sent in Japanese language. This problem is particularly with Hotmail Live and Yahoo Beta mails for rest all like Gmail, Hotmail original and Yahoo original its working fine. It may be some character encoding problem, but is there any way that I can get rid of this issue.
Mail Function-subject Getting Ascii Charactes For Japanese Text
I am using mail funtion to send mail to some people having japanese text as contents. the data for the mail comes from database where the data is stored in UJIS. while sending the mail i am setting the encoding as UJIS in mail headers. but when the mail is sent using this data, the subject line of the mail gets ascii characters. contents appear in correct japanese,just the problem is with subject one more thing there is no problem with the data stored in database.
Read True Type Font (ttf) Tags (font Name...)
I try to acces to the font name of my ttf fonts using a php script with the file name. I've found a script reading idv tags from mp3 files, but it's too specific. Can anyone say me how to read a ttf file in php ?
Issues With Mail()
I basically wrote an auto emailer that will send a welcome email to a new user and then update the db to say that the mail had been sent in order to avoid sending a million emails. The problem is this.. mail() doesn't always return true when an email has been sent successfully... I know this because I tested it on myself a number of times last night. In faact, I am not sure the mail() function has ever returned true after a successful exicution. Now I really have no idea if the emails are being sent of not since the mail() function returns false all the time and I know that atleast some of the time mail is being sent but I can not be certain that it is always being sent due to mail() returning false.
[GD] Could Not Find/open Font - Font Problem
I know this subject was up several times but Icant get it work use gd2 on win32 <? putenv('GDFONTPATH=f:swdfont'); $font = "f:/swd/font/arial.ttf"; $im = imagecreate (250, 28); $black = ImageColorAllocate ($im, 0, 0, 0); $yellow = ImageColorAllocate ($im, 235, 235, 51); ImageTTFText ($im, 20, 0, 10, 20, $yellow, $font, "comming text or not?"); ImagePNG($im,test.png); ?> <img src="test.png" alt="image"> but I allway get error about not finding font ..
Chinese Encoding
I have a forum mainly in Chinese character. There are some characters which cannot be shown correctly and turn into "& #22175" ... does anyone know how to fix this?
Chinese Characters
I need to store chinese characters and Pinyins in a mysql database and then read them from php and using the GD library and imagettftext() function to create an image based on a chinese ttf font of the chinese characters. I have tried setting the encoding in the database as UTF-8 and BIG5 but the characters display (both in MYSQL and when displayed via PHP)...
Chinese Filenames
I would like to know if you can open chinese filenames under win2000 using PHP 5.0? I have a file named ä¸*国.php, and try to open it using fopen(‘ä¸*国.php','r');. I save the source file as UTF-8. I get the error: Warning: fopen(ä¸*国.php) [function.fopen]: failed to open stream: No such file or directory in E:TranslationWebsite Developmentwebroot estingzhongguo.php on line 8 I have triple checked that the file exists. Changing the source code encoding to 'Unicode (UCS-2)' leads to no output in the browser window. Does PHP even support opening chinese filenames? Secondly, I'm having some trouble accessing filenames with chinese characters that have been uploaded via HTTP. I'm using PHP 5 and Apache 2.2. When I attempt to upload a file with chinese filenames, the file name gets mutated into dashes, pretty much matching the behaviour described at 'http://gallery.menalto.com/node/57709'. However, I need the original filename (to store in a DB). The post on the manual website by kweechang at yahoo dot com at http://au3.php.net/manual/en/ features.file-upload.php describes using javascript to set a hidden field. This would work fine but for now I'm trying not to resort to javascript on my webpage. Does anyone know how the original filename can be retrieved without using javascript? Maybe there is a setting in Apache?
GD And Chinese Character
I've been around trying to find a solution to write chinese characters on an image (png or jpg) with the GD support in PHP4 (and TTF support)...but still looking for!
Chinese Characters
i'm trying to build a english/chinese site in php and mysql. the mysql database seems to be happy to store the chinese characters, i'm now trying to sort out the php code to display them back in pages and use them in image creation script. i've done somthing with asp before and it need these addition codes to display the chinese; this code goes at the top of the asp: <%@LANGUAGE="VBScript" CODEPAGE=950%> then this meta to do the chinese: <meta http-equiv="Content-Type" content="text/html; charset=big5"> and this one to handle the english: <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> a quick search found the php code: $HTTP_ENV_VARS["LANG"] does this have some thing to do with it? any pointers would be great.
Chinese And Arrays
I'm trying to make a simple script beginner level script, with just functions. it uses the functions: file_get_contents substr taking into an array the text substr took then array_count_values and sort by value the text used is chinese text, and after it is taken into an array or maybe even in file_get_contents, I think it's no longer chinese but converted somehow. anybody knows how to deal with this? do i need to convert before, or perform something? I use echo to screen, but can also write to file the results. it doesn't look like chinese.
Copy() Japanese Characters
I use copy() in the time of file uploading. but at the time of uploading the file name change to unreadable char( my file name is in japanese char). I use win xp japanese version and php 5. So how can i upload file and keep the file name unchange in japanese char.
Assign Japanese String To Var
Following code contains japanese string that is assigned to variable $str. code ============= <?php $str = "$B%0%C%I%P%$%T%+%=(B"; ?> ========= When i am executing above program it gives me error as following. Parse error: parse error, unexpected $ in /var/www/html/bhavin/mohla1.2.2/b.php on line 3 Do anybody have solution for the above problem. How can i assign above japanese string($B%0%C%I%P%$%T%+%=(B) to variable without error.
Japanese Text Display
I have Japanese data coming from a mySQL database. It's internal encoding is EUC-JP and it is outputted as SJIS. This actually works just fine. My question comes from the fact that once these changes were made, all the static Japanese text on the page is botched. The meta tag in the head is set to Shift_JIS(SJIS) and it worked before the change. Any suggestions? I just can't see how the two match up... The encoding of the db info shouldn't affect the encoding of static info on the page should it? Especially when they are both output in the same encoding..
Japanese Symbols And Imagettftext
I need to create image because I can't display Japanese symbols using font for them. When I use utf-8, I receive a warning for not supporting. What should I do to use imagettftext ?
Using Chinese Character As Login/password
I would like to create a user login/password interface where people can registered using their chinese name, I have tried using MySQL, and it is easy to retrieve information from Chinese without any special code written... But I couldn't use it as login/password system because it doesn't provide matching with the db in chinese character....do you know why?
Looking For Chinese->English Translation Script
I need to translate short sentences, maybe at most 100 per day. I know google has one, but it can not be crawled http://world.altavista.com/tr http://www.google.com/translate_t Is there a database I can download, a php/perl script, a GET url I can use?
Can't Display Chinese Characters Using Imagettftext
I have a font (GungSeo) that contains chinese characters but I can't get imagettftext to display them. All I want to do is insert random chinese characters into a dynamic image. I know the unicode range where I can find these characters, but they are not displayed. Regular latin characters work. The php documentation for imagettftext says: "May include decimal numeric character references (of the form: € ; ) to access characters in a font beyond position 127." this is what I have: imagettftext( $im, $fsize, 0, $x, $y, $color, $font, '絡 ;' ); Anyone know how to do this? I'm kinda clueless about character sets and encodings. (I deliberately put a space before the semicolon in the above quote and code block so the browser wouldn't display the actual character.)
Webbased Email Client With Japanese Text
I am developing the mail client using PHP, when I try to send a mail using mail() of PHP. All the text written in Japanese language converted to junk characters. How can I send the mail with japanese language using PHP only.
Capturing Chinese/Korean Characters In A Form?
I am new to PHP and have been asked to create an HTMl form that captures data onto a text file. I have that working fine. I now need to capture Chinese/Korean characters from this same form and onto a text file. How do I do this? Is it possible to have one form that can capture US Alphabet and Chinese/Korean characters?
Inserting Japanese Characters Into UTF-8 MySQL Database Via Php
I have problems with inserting Japanese chars into MySQL database. This operation results in two completetely different strings that I can see via phpMyAdmin: $word: SELECT word FROM table; INSERT $word INTO table; Both commands are executed direclty via PHP, phpMyAdmin shows the original word (inserted into table via phpMyAdmin) correctly and a wrong copy (f.e. %&c/#....) of word inserted via PHP. I preasume that the problem is PHP default coding, I tried to convert encoding to UTF-8 by mb_convert_encoding($key, "UTF-8", "auto"); with no success.
Read From A Text File, Output To Browser In Japanese
I am trying to store data in a text file and output it to the browser using PHP. All very easy - if I was using English! the problem is, I want to use Japanese and I'm finding it a tad difficult to get PHP to understand. I have two files, a text file containing data to display and a php file with a script to display the data. I can get the contents of a text file displayed in English, no problemo, but in Japanese, it's another story... All the correct settings are enabled in the php.ini file for Japanese language support (mb_string, input_encoding, output_encoding settings etc..etc..) even if I save the text file, to be read from, in Shift_JIS encoding - I still can't get it to display normally! here's the script I'm using to read the text file : <? $filename="test.txt"; $fp = fopen($filename,'r'); while($line=fgets($fp)) { //output text file line print $line."<br>"; } fclose($fp); ?>
Preserving Chinese Characters When Reading And Writing Text
I am using PHP 5.2.2 together with MP3_Id (a PEAR module for reading and writing MP3 tags). I have been using PHP on the command line (Mac OS X Unix shell, to be precise), and am getting on more or less OK. So far, I have managed to parse my tab-delimited .txt file properly into an array, and then use this array to update the tags on a bunch of MP3 audio files. Nice. Thing is, some of the track names specified in my text file are in Simplified Chinese characters. These show up just fine within my .txt file's editor (TextMate), but appear garbled within the final output. Ack. What I need is a way of reading and/or preserving the Chinese characters, so that I can (hopefully) write them to my MP3 files. I am sure some of you have already cracked this one a long time ago. I hope you'll exercise some patience and give me a few pointers here! I am not much more than a PHP newbie, so forgive me if I have overlooked anything obvious :-)
Displaying Japanese Characters In Subject Line Of Email Using Php String
$ResponderSubject = "テド"; I have the above line of code, which displays some Japanese characters. This particular string will be displayed in the Subject line of an email. The problem I'm having is that the actual ASCII characters are being displayed instead of the Japanese characters. Is there a way to fix this?
PS Font
I have been trying to use .pfb fonts (Type 1) to generate dynamic images. However the text in the images is very aliased and blurred. This is of course not because of the font or the font style itself. Please let me know if you have any ideas or opinions about it. Code snippet: $SIZE = 14; $FONT_PATH = "/usr/X11R6/lib/X11/fonts/Type1/hell.pfb"; $FONT = ImagePSLoadFont($FONT_PATH); $im = ImageCreate(100, 100); $white = ImageColorAllocate($im, 255, 255, 255); $gray = ImageColorAllocate($im, 134, 134, 134); // draw ImagePSText($im, $str, $FONT, $SIZE, $gray, $gray, 0, $SIZE,0,0,0,16); ImagePSFreeFont($FONT);
Can You Arc A Font With PHP?
I am writing a program with the GD library and need to arc a font like Photoshop does. I know how to write text, slant a font, etc., but I cannot figure out how to arc it and do other things. Is this possible with PHP?
With Includes / Font Tag
I was wondering how I would be able to strip the <font> tags from a file when I include it so it can take on the characteristics of my own stylesheet instead of the font tag attributes.
PHP Font Boundingbox Help
I'm trying to understand how to work with bounding boxes around text with the GD2 library. I thought I understood the concepts and wrote a simple program to make sure. Here it is: <?php putenv('GDFONTPATH=c:windowsfonts'); $bbox=imagettfbbox(10,0,"arial.ttf","Hello World"); echo "upper left ($bbox[6],$bbox[7])-----upper right ($bbox[4],$bbox[5])<br><br>"; echo "lower left ($bbox[0],$bbox[1])-----lower right ($bbox[2],$bbox[3])"; ?> The idea is for me to find out the bounding box coordinates for a Hellow World message. The output produced has me very confused though. It shows the coordinates as follows: upper left (-1,-10)-----upper right (66,-10) lower left (-1,-1)-----lower right (66,-1) I understand how the lower left coordinate can be -1,-1, and the lower right coordinate seems logical, too. How, though, can the upper coordinates have y values of -10? That's below the baseline! It would seem logical that since I specified a font size of 10 my Y coordinates on the top would be roughly 10 more than the y coordinates of the lower corners. So, I'd expect the upper coordinates to be something like (-1,10) and (66,10). Where is the negative 10 coming from?
Embed A Font
How do I embed a font onto a remote user's machine? Say he dont have a Papyrus but I want him to view the webpage using the Papyrus font.
Add A New Font To Editor
I want to add a new font to the editor(Innovaeditor).. I changed the font name in editor side and add that font in my fonts folder in control panel... But the name of the font is like this "??"
ImageString: How Do I Use A Font That Is Not One Of The Default 5?
I am playing with imagegd for generating images, and was wondering if there is a way I could use a font that is not one of the default 5? I remember reading somewhere about a TT font library for imagegd, but don't remember the specifics. If someone could point me in the right direction I would appreciate it.
GD & Text / Font Tricks Anyone?
Does anyone know any tricks->(Read: code) for creating different font effects using the GD Lib. I know how to create images using ttf fonts but they all pretty plain and boring. Shading Effects, Glows, Shadows etc?
Fixed Font Size
I making a web site where people can change the font size with a form on a seperate page. I store the value in session-variables and read them every time a page is loaded. I wonder if it is possible to prevent people changing the fontsize with Mozilla or IE menu's? Can anyone tell me more about this?
Change Font Size
I need a little help in changing the output of a script with the font size, I am using a users online script, but the output of the font is not specified so it comes out as the browser default size. this is the echo statement // Show all users online if ($user==1) {echo $user.' user online'} else {echo $user.' users online'} ?> Is there a way to add something to this to output a differant font size, I am clueless with php, Not even sure if this is the bit of the script that will change this.
Change Font GD Extension
I found a tutorial on how to write text onto an existing image, but now I am having trouble changing the font of the outputted text. Code:
Windows -> UNIX Font
i programmed a security image thing, but i programmed it on my computer, so it's taking it's fonts from C:WINDOWSfonts the webserver i am trying to implement it on is UNIX..can anyone help on what to set the font path at to load a font? and what's a good font to use? i want to use a serif font since the terminal ones are easier to read via bots.
Font Size In Imagestring()
How do you change the font size when using imagestring() ?? I know you can choose between 1 and 5 but since I added in a font, I do not know how to specify the font size Here is my code: imagestring($captcha, 5, 20, 10, $string, $colour); but as soon as i replace the 5 with my $font, it becomes tiny
Read And Display Japanese Text From Text File
I posted a question regarding reading japanese text from a text file. Well, since I solved the problem, I thought I'd post my solution for the benefit of other people with the same problem. The plan was to make a script to read and display japanese text. I will use it for making a japanese proverb script and for a japanese language study script. Method : I wrote a simple kanji text file (saved with UTF-8 encoding) I wrote a simple PHP script to display the file contents (saved with UTF-8 encoding) I specified the content-type header for the HTML page : <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> *** All files have the same encoding. *** UTF-8 supports japanese characters. and it works! this is my PHP (and HTML) script : <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>PHP : Japanese Text File Read : Exercise 1</title> </head> <body> <?php $filename="japanese.txt"; //open file $fp = fopen($filename,'r'); //loop through each line in the file while($line=fgets($fp)) { //output current text file line print $line."<br>"; } //close file handle fclose($fp); ?> </body> </html> I know it's a very simple script, for testing purposes only. It displays the contents of the japanese text file line by line. The key was to save all files in the same encoding (I used UTF-8) and to specify the encoding / charset in the HTML header (<meta http-equiv="Content-Type" content="text/html; charset=utf-8">)
Fpdf Adding Font Problm
Have anyone experience problem when trying to add font on fpdf (window version) for type1 font?
Change Font Style In PDF-files
I'm trying to change the font style for Tahoma from normal to italic. I inserted Tahoma and TahomaBD. But I can't find anything about changing the style, but underline...
Image With Functions And Font Face.
does anybody know how to change font-face in Arial,Verdana etc. when i'm using image-functions of PHP? Font-Size is clear to me... $fontSize=2 imagestring($im, $fontSize, $px, 34+($i*1.2), $line, $orange);
Thoughts On Font-size Control
I have been researching some different techniques to controll font size on a webpage and offer users a way to easily manipulate the font and was curious as to what methods others were using/had used in the past for this sort of thing. I have been using static point font sizes on a stylesheet. With a script that swaps out the stylesheet for one with larger point sizes upon clicking a button. I chose this technique out of all the others I have seen because it seemed to offer the most compatability with slightly out of date browers etc. However the built in font controll from IE, Firefox etc. still wreaks havoc on my sites layout. I am worried about using em's as I just dont see how to make that work in conjunction with images that are far less plyable than the text and other design elements. is there any way to supress the view>textsize? Has anyone had success with em's? Or does anyone have an interesting way to tackle this problem?
To Install A New Font While View Page!!!!
I am working with chinese fonts and experienced the difficulty as a user to view that page in chinese... How can i add (or install )chinese fonts to the user's system while the user try to view that page!!!!
How To Load Font At Client Side?
How to load font at client side..likeIf I am searching keywords "Hindi" in google search engine..So in the result page I can see the fonts are in hindi, even though hindi font is not installed @ my(client) side.. I dont want to install manually @ client side.. It would be directly handeled via server.. (like above example)so how its possible in php?
|