473,387 Members | 1,790 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,387 software developers and data experts.

Special characters pulled from wordpress database

Hello,

I'm developing a site that makes use of wordpress. The homepage is
outside of wordpress and I am pulling the latest 3 blog posts from the
wordpress database to display on the homepage. The problem is that
special characters (—) for example, do not display properly. It
displays as a "?" with a diamond around it �. The characters actually
display fine withing the wordpress blog portion of the site.

I tried changing the encoding on the homepage to UTF-8 (wordpress uses
this), but no luck. Any ideas?

Thank You
Jan 28 '08 #1
4 3744
I tried changing the encoding on the homepage to UTF-8 (wordpress uses
this), but no luck. Any ideas?
What does your browser say the encoding is?

Did you try to save a string from the database to a text file?

If the browser says it is utf-8, and the text file shows question marks
(even in a hexdump), it may be the connection library that generates the
question marks.

Good luck,
--
Willem Bogaerts

Application smith
Kratz B.V.
http://www.kratz.nl/
Jan 28 '08 #2
On Jan 28, 9:03 am, Willem Bogaerts
<w.bogae...@kratz.maardanzonderditstuk.nlwrote:
I tried changing the encoding on the homepage to UTF-8 (wordpress uses
this), but no luck. Any ideas?

What does your browser say the encoding is?

Did you try to save a string from the database to a text file?

If the browser says it is utf-8, and the text file shows question marks
(even in a hexdump), it may be the connection library that generates the
question marks.

Good luck,
--
Willem Bogaerts

Application smith
Kratz B.V.http://www.kratz.nl/
Strange. My browser (firefox) was set to UTF-8 encoding. I set it to
ISO-8859-1 and the mdashes display fine. If I change the encoding in
the header of the web page to UTF-8, and then try to view with the
browser set to UTF-8, I still see the nonsense character. Any ideas on
why this won't work with UTF-8. The header of the Wordpress page shows
UTF-8, and everything displayes fine with the browser set to UTF-8.

Thanks,
Jan 28 '08 #3
On Jan 28, 1:46 pm, sleepy1038 <clar...@gmail.comwrote:
On Jan 28, 9:03 am, Willem Bogaerts

<w.bogae...@kratz.maardanzonderditstuk.nlwrote:
I tried changing the encoding on the homepage to UTF-8 (wordpress uses
this), but no luck. Any ideas?
What does your browser say the encoding is?
Did you try to save a string from the database to a text file?
If the browser says it is utf-8, and the text file shows question marks
(even in a hexdump), it may be the connection library that generates the
question marks.
Good luck,
--
Willem Bogaerts
Application smith
Kratz B.V.http://www.kratz.nl/

Strange. My browser (firefox) was set to UTF-8 encoding. I set it to
ISO-8859-1 and the mdashes display fine. If I change the encoding in
the header of the web page to UTF-8, and then try to view with the
browser set to UTF-8, I still see the nonsense character. Any ideas on
why this won't work with UTF-8. The header of the Wordpress page shows
UTF-8, and everything displayes fine with the browser set to UTF-8.

Thanks,
Any other ideas on this issue. Since my last post, I tried using
utf8_encode on the string pulled from the database. This method
actually strips out the special characters entirely!! I'm at a loss.
Feb 1 '08 #4
NC
On Jan 28, 5:39 am, sleepy1038 <clar...@gmail.comwrote:
>
I'm developing a site that makes use of wordpress. The
homepage is outside of wordpress
Bad idea... There's no reason for it to be outside of
WordPress...
and I am pulling the latest 3 blog posts from the wordpress
database to display on the homepage. The problem is that
special characters (&mdash;) for example, do not display
properly.
....
I tried changing the encoding on the homepage to UTF-8
(wordpress uses this), but no luck. Any ideas?
Reimplement the home page as a WordPress Page; write a plugin to
extract and display the last three blog posts and use it on the
home page.

Cheers,
NC
Feb 2 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in...
4
by: Ewok | last post by:
let me just say. it's not by choice but im dealing with a .net web app (top down approach with VB and a MySQL database) sigh..... Anyhow, I've just about got all the kinks worked out but I am...
2
by: andymilk | last post by:
Greetings! I'm using a dropdown to set the value of a textarea to some text pulled from a database. This text is something like this: 单元 When I use a simple "document.write", it displays...
5
by: Doc | last post by:
Hello! I'm experiencing a little problem counting the number of characters in a textarea on a html page. This is the content type of my HTML document content="text/html; charset=iso-8859-1" ...
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
7
by: Trac Bannon | last post by:
When I load XML from a file into a dotNet XMLDataDocument, the UTF-8 codes are resolved but the 5 special XML entities are not. How can I force those 5 special character types to be translated?
0
by: surfivor | last post by:
I am doing some preliminary research as we are slated to do a project with wordpress. I looked at the wordpress code and realized why I like MVC so much (Rails) because the code mixed in with the...
6
by: TheRealDan | last post by:
Hi all. I'm having a problem with a special characters. I have php script that reads from an xml file and writes to a mysql db. It's a script called phptunest that I found on the net, although the...
2
by: dibyenduchatterjee | last post by:
I am getting some special characters in my browser displayed weirdly, while getting them from from the BLOB of a DB table. Here it is : " My name is �Dibyendu Chatterjee�....." I want all...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.