#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    10
    Rep Power
    0

    Euro sign is not read in ASP


    Hi!

    I'm trying to display the euro sign using this code:

    If CurrencyStr = "EUR" Then
    CurrencyStr = "<b>$euro</b>"
    End If

    but it wont work. I also tried this code:

    If CurrencyStr = "EUR" Then
    CurrencyStr = "<b>& # 8 3 6 4 ;</b>"
    End If

    but still it doesn't work. Your help is very much appreciated. Thank you.

    *Note: I put spaces in the second code because the forum converts it to euro sign.

    -Rex
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    Try here:
    http://webdesign.about.com/od/localization/l/blhtmlcodes-cur.htm

    In your first example, you put "$euro", looks like it should be: "&euro".

    You have spaces in between your second example, it should be: <b>€</b>
    http://classicasp.aspfaq.com/general/how-do-i-display-the-euro-symbol-8364-in-my-asp-pages.html

    Apparently there can be issues:
    http://www.cs.tut.fi/~jkorpela/html/euro.html

    Found all that in 2 minutes with Google, using this search:
    "html display euro symbol"
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    10
    Rep Power
    0
    Sorry about the '$' sign instead of the '&'. I already changed it and it did not work. As for the second issue as to why I put spaces in this code "&#8364", it is because THIS forum converts it to euro sign so I put spaces. However, in my actual code, i did not put spaces there and it still did not work in my case. I even put this <meta http-equiv="content-type" content="text/html;charset=utf-8" />. I'm stuck in this problem.
  6. #4
  7. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,430
    Rep Power
    4539
    Put in response.write debug probes to see what currencystring ends up looking like, or view the page source your asp code creates over in the browser
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    10
    Rep Power
    0
    It doesn't convert to euro sign, instead, it displays the code itself. The "<b>& # 8 3 6 4;</b>"

    *i put spaces so that the forum wont convert it.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    10
    Rep Power
    0
    By the way, Im trying to display the euro sign in a pdf file. In a normal ASP/html page, it shows normally but in a pdf format it wont. So basically that is my problem right now, how to print a euro sign in pdf.
  12. #7
  13. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    Originally Posted by xerexie
    By the way, Im trying to display the euro sign in a pdf file. In a normal ASP/html page, it shows normally but in a pdf format it wont. So basically that is my problem right now, how to print a euro sign in pdf.


    Dude. HTML pages and PDF files are not the same thing.
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2011
    Posts
    10
    Rep Power
    0
    Originally Posted by Ronster


    Dude. HTML pages and PDF files are not the same thing.
    Yes, I just realized that awhile ago. But surely there is a way how to display it in a pdf file. I just don't know how. And I'd gladly appreciate a help from experts.
  16. #9
  17. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Location
    Charlotte
    Posts
    412
    Rep Power
    144
    Originally Posted by xerexie
    Yes, I just realized that awhile ago. But surely there is a way how to display it in a pdf file. I just don't know how. And I'd gladly appreciate a help from experts.
    My POINT, is that you are in a CLASSIC ASP forum, and said nothing about pdf files in your original post. Being precise in your questions really help. I have no idea how to do it in a pdf file.
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2011
    Posts
    1
    Rep Power
    0
    Reply to debug what currencystring looks like the end of the probe, or view the source code of ASP code page in the browser to create more...
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2011
    Location
    united states
    Posts
    2
    Rep Power
    0
    Hello,

    I think i also try to put s p a c e s in there so that the forum didn't convert the code. You need to write it without the spaces.

IMN logo majestic logo threadwatch logo seochat tools logo