473,800 Members | 2,273 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3774
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...@kra tz.maardanzonde rditstuk.nlwrot e:
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...@kra tz.maardanzonde rditstuk.nlwrot e:
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
17211
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 oracle database. When i retrieve the data, some of the special characters have been changed to ??? and also
4
5267
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 having trouble preserving data as it gets entered into the database. Primarily, quotes and special characters. Spcifically, I noticed it stripped out some double quotes and a "Registered" symbol &reg; (not the ascii but the actual character"
2
2319
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 the characters
5
3691
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" I have a textarea that I want to limit to 400 characters, but the enduser can enter special characters (like €, v, 8, ...). I have
1
4576
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, 2. Text checks for max. length of the field & whether the field is mandatory or optional Example:
7
4924
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
4110
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 rendering looked like a mess to me. I'm not at all sure exactly what we will be doing on the project as the details haven''t been discussed yet. I found that the Wordpress API doesn't look well documented. I set up wordress and created some blog...
6
3880
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 original website for the author appears to be gone. It works really nicely except when it hits special characters. Everything from a sp char forward just gets lost. It is using mysql_real_escape_string, but that doesn't seem to help with the ...
2
2046
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 special characters pulled from the BLOB as it is through perl. Please help...
0
9690
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9551
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10505
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10275
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10033
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5471
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5606
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.