How to display Vulgar Fractions

How to display Vulgar Fraction One Third

Page 1 of 1

3 Replies - 5778 Views - Last Post: 18 December 2007 - 08:40 AM Rate Topic: -----

#1 Caeanis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 17-December 07

How to display Vulgar Fractions

Posted 17 December 2007 - 05:44 AM

I have been unsuccessfully able to print the Vulgar Fraction One Third (⅓). I have tried using CHW(8537), ChW(&H2153), normalize and a few other suggestions I've seen posted elsewhere. Is there a way to return the exact character? Incidentally, the other vulgar fractions with even denominators (One Eighth for example) work just fine using Chw. I am trying to write the character to an xml file but I am using messagebox to double check that the correct value is getting posted.

Thank you!

Is This A Good Question/Topic? 0
  • +

Replies To: How to display Vulgar Fractions

#2 orcasquall   User is offline

  • D.I.C Head
  • member icon

Reputation: 13
  • View blog
  • Posts: 158
  • Joined: 14-September 07

Re: How to display Vulgar Fractions

Posted 17 December 2007 - 06:51 AM

Try ChrW(8531)

I think 8537 is 1/6...
Was This Post Helpful? 0
  • +
  • -

#3 Caeanis   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 17-December 07

Re: How to display Vulgar Fractions

Posted 17 December 2007 - 02:49 PM

View Postorcasquall, on 17 Dec, 2007 - 06:51 AM, said:

Try ChrW(8531)

I think 8537 is 1/6...


You are right. It is ChrW(8531), but it still gives me a square symbol. Is there a way to force that character or maybe to set the default font for dialog boxes? What I want to do is write the value as an innertext value of an xmlnode, but I want to be sure that it actually writes the vulgar fraction and not some nonsensical character.

Marc Tucker
Was This Post Helpful? 0
  • +
  • -

#4 orcasquall   User is offline

  • D.I.C Head
  • member icon

Reputation: 13
  • View blog
  • Posts: 158
  • Joined: 14-September 07

Re: How to display Vulgar Fractions

Posted 18 December 2007 - 08:40 AM

I tried displaying the fraction in a message box. It looks fine, though a little small. Going on a guess here, maybe your Windows don't have Unicode support on display? Some setting perhaps?

As for writing to XML files, you can try writing the HTML entity & # 8531; (remove the 2 spaces between ampersand and hex, and hex and 8) directly into the file instead. Example, you can write the string "This is vulgar fraction one third & # 8531;" in the XML file (or inner text of node).
Check this out, and you can also search for "html entity vulgar fraction one third".

After you wrote the XML file, try opening it up in Internet Explorer, or any XML browser. You should have the fraction displayed.

This post has been edited by orcasquall: 18 December 2007 - 08:46 AM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1