Special Characters and files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ids
    Developer Partner








    • Mar 2006
    • 2171

    #1

    Special Characters and files

    I need to figure out if this is acceptable:

    Code:
     <mvt:assign name="l.settings:feed_description" value="glosub( l.settings:feed_description, '&reg;', '®' )" />
    The substitution works. However, when loading the file in a real text editor or browser, there is an extra character and I am having no success finding out why. The replacement REG comes in as:

    Code:
    ®
    The &Acirc; is consistent throughout the file for any character I am doing a glosub for. Anyone know why and will it affect data feeds such as Google Shopping?

    Thanks,

    Scott


    Need to offer Shipping Insurance?
    Interactive Design Solutions https://www.myids.net
    MivaMerchant Business Partner | Certified MivaMerchant Web Developer
    Competitive Rates, Custom Modules and Integrations, Store Integration
    AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
    My T-shirt Collection is mostly MivaCon T-shirts!!
  • wmgilligan
    Developer Partner




    • Feb 2006
    • 742

    #2
    I believe it has to do with the encoding.... something like this is needed (don't recall the specifics unfortunately)... <meta charset="utf-8">
    William Gilligan - Orange Marmalade, Inc.
    www.OrangeMarmaladeinc.com

    Comment

    • ids
      Developer Partner








      • Mar 2006
      • 2171

      #3
      Thanks Bill.

      I did see that sort of solution elsewhere. We're actually not worrying about the browser. This feed file won't be loaded in a browser AFIK. I did make sure my editor loads a file detecting utf-8.

      The main concern is the Google shopping feed.

      Scott


      Need to offer Shipping Insurance?
      Interactive Design Solutions https://www.myids.net
      MivaMerchant Business Partner | Certified MivaMerchant Web Developer
      Competitive Rates, Custom Modules and Integrations, Store Integration
      AutoBaskets|Advanced Waitlist Integration|Ask about Shipping Insurance Integration
      My T-shirt Collection is mostly MivaCon T-shirts!!

      Comment

      • alphabet
        Mega Mivite





        • Aug 2006
        • 1160

        #4
        Google shopping feed will make a best guess for the character set if it is not declared in the XML tag.

        It looks like you are using Unicode ISO-8859-1, so change assignment to:

        Code:
         <mvt:assign name="l.settings:feed_description" value="glosub( l.settings:feed_description, '&reg;', 'U+00AE' )" />

        And on the Google Feed declare:

        Code:
        <?xml version="1.0" encoding="ISO-8859-1"?>
        
        // rest of feed
        http://www.alphabetsigns.com/

        Comment

        Working...
        X