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 223087
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:11:17+00:00 2026-05-11T19:11:17+00:00

QTextEdit t; t.setHtml( ); displays a small ‘a’ with acute accent instead of a non-breaking

  • 0

QTextEdit t; t.setHtml(" "); displays a small ‘a’ with acute accent instead of a non-breaking space. This happens only on Windows not Linux or FreeBSD.
What might be causing this? A bug in Windows/Qt? How can I fix this?

(Qt 4.5 on Windows Vista x64 pro. My locale is the default ‘C’.)

Update: I have a feeling that this is bug in Qt/Windows (have already submitted a bug report). I have created a workaround but it’s ugly and involves changing my formatting alogrithm and uses <pre> </pre> with CSS to produce the desired output.

Is there any simpler workaround?

Update: &8194; and &8195; both work as suggested by ‘wcm’. Is it safe to assume that this will work for other users too?
&nbsp; not working is probably still a bug, but &8194; appears to be an acceptable workaround(?).

Update: Turns out I missed something important: &nbsp; in Qt/Windows renders incorrectly only with the particular monotype font that I was using called ‘Terminal’. When I switched to ‘Lucida Console’ (or any other font for that matter) &nbsp; renders correctly! Man I wish I had noticed this earlier! Damn. So obviously there is a bug somewhere (most likely in Qt). But nevermind that, atleast for me using a different font has solved the problem.

Update: It’s not a bug in Qt as I previously thought.
To know the reason why &nbsp; is being rendered incorrectly please see Tewha’s answer.

[SOLVED]

  • 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-11T19:11:17+00:00Added an answer on May 11, 2026 at 7:11 pm

    I see you’ve mostly figured this out, but I thought I’d add the “why” of it. The Terminal font is based on code page 437, aka DOS-US. á is in position 160.

    There aren’t many fonts for code page 437. I think Terminal is the only TrueType one, in fact! At any rate, if you’re not explicitly trying to display old school DOS graphics, you shouldn’t be using Terminal.

    What’s code page 437 all about? It’s “high ASCII”, circa 1981. In addition to the usual 32-127 characters, it includes a few accented letters, box graphic characters to draw borders around things, some mathematical symbols and even symbols for the four suits of cards! But the world moved a different way, so aside from 32-127, even the glyphs that are usually available in other fonts aren’t where you’d expect them to be. If you were running an old text-mode MSDOS program in a window, it would be using a code page 437 font.

    See “code page 437” (Wikipedia) for more information.

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

Sidebar

Related Questions

I have a QTextEdit box that displays text, and I'd like to be able
I have this class: class CustomEdit : public QTextEdit { Q_GADGET public: CustomEdit(QWidget* parent);
Why doesn't drag and drop pictures work on this QTextEdit? I have tried everything.
This code runs a little window with a toolbar and a QTextEdit area. If
I'm trying to create QTextEdit with some text, and in this text I have
Anyone have any Idea why I don't have this function (setTextFormat) in my QTextEdit
I inserted several images into QTextEdit with QTextCursor, now how should I save this
How to make QTextEdit to be resized in a QWidget while the QWidget is
Consider there is a QTablWidget and a QTextEdit. Both of them are in a
I'm trying to print the content of a QTextEdit . For that I'm using

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.