Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4085282
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T18:33:17+00:00 2026-05-20T18:33:17+00:00

How can I show any character encoding in a HTML text area? I currently

  • 0

How can I show any character encoding in a HTML text area?

I currently take in a users HTML page via direct input (textarea) and then I parse it by changing href links to something else via PHP and then I echo out the parsed HTML back to the user on a different page in a textarea.

However, I get square characters for chinese characters and I am wondering how I can handle this and do this for all languages or character encoding?

As a side note, I store the parsed HTML in my DB base64_encoded which works well, this was achieved with the help of SO with a previous question I had.

Thanks all for any help on how I can fix this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T18:33:18+00:00Added an answer on May 20, 2026 at 6:33 pm

    If the data appears healthy in your database, the problem is not on the user input side. (verify this by accessing your database ‘directly’ – eg. through Sequel Pro or PHPMyAdmin – and running the data in it through a base64 de-coder).

    If the data is healthy, then the reason your data isn’t showing up properly in the textfield is probably because the browser is expecting text in a different encoding from the one you’re sending in.

    My advice: when loading the data from the database, after base64 decoding, make sure it is UTF8-encoded before you send it back to the browser, and send the following header to the browser before you output anything else:

    header ('Content-type: text/html; charset=utf-8');
    

    I hope that solves the issue for you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way so that i can show only first character of a
I have a set of html text boxes that take input and when the
Is there any way I can print/show images on top of each other. The
I am a newbie wants to start symbian development. Can any body show me
Is there any way to make find-name-dired to only show filenames that I can
How I can show only 2 posts on my websites first page? I am
can anyone recommend a website crawler that can show me all of the links
In Prototype I can show a loading... image with this code: var myAjax =
With this code I can show an animated gif while the server script is
if so can show simple example, ex in jquery ajax.post

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.