Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Oct 2006
    Location
    Spain
    Posts
    187
    Thanks
    7
    Thanked 0 Times in 0 Posts

    Question Dirty characters

    Dear all,

    How I convert from a textarea all dirty (spanish) characters in asc ii characters like the picture below please?

    Thank you in advance
    Attached Images Attached Images

  2. #2
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    3,395
    Thanks
    3
    Thanked 590 Times in 576 Posts
    Hi there lebronletchev,

    make sure that you always use this meta tag <meta charset="utf-8"> in all of your documents.

    The following example shows the display of the special Spanish characters...

    Code:
    
    <!DOCTYPE HTML>
    <html lang="en">
    <head>
    
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,height=device-height,initial-scale=1">
    
    <title>untitled document</title>
    
    <!--<link rel="stylesheet" href="screen.css" media="screen">-->
    
    <style media="screen">
    body {
        background-color: #f9f9f9;
        font: 100% / 162% verdana, arial, helvetica, sans-serif;
     }
    
    pre, textarea {
        display: inline-block;
        vertical-align: top;
        min-height: 12em;
        padding: 1em;
        margin:0 0.5em;
        border: 1px solid #999;
        font-size: 1.5em;
        background-color: #fff;
     }
    </style>
    
    </head>
    <body> 
    
    <pre>
      = &# + 0225;
      = &# + 0233;
      = &# + 0237;
      = &# + 0243;
      = &# + 0250;
      = &# + 0241;
      = &# + 0252;
      = &# + 0161;
      = &# + 0191;
    </pre>
    
    <textarea>
      = &#0225;
      = &#0233;
      = &#0237;
      = &#0243;
      = &#0250;
      = &#0241;
      = &#0252;
      = &#0161;
      = &#0191;
    </textarea>
    
    </body>
    </html>

    coothead
    ~ the original bald headed old fart ~

  3. Users who have thanked coothead for this post:

    lebronletchev (Oct 22nd, 2018)

  4. #3
    New Coder
    Join Date
    Nov 2018
    Location
    Manchester
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for this code coothead, can we use it with other languages like German or Italian?

  5. #4
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    3,395
    Thanks
    3
    Thanked 590 Times in 576 Posts
    Quote Originally Posted by HenrySh View Post
    "...can we use it with other languages like German or Italian?"

    You certainly can, and even Chinese or Greek if so required.

    C&P'ing the symbol is OK too.

    coothead
    Last edited by coothead; Nov 5th, 2018 at 04:14 PM.
    ~ the original bald headed old fart ~


 

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •