Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Re: Stata does not understand some strings


From   "Joseph Coveney" <[email protected]>
To   <[email protected]>
Subject   st: Re: Stata does not understand some strings
Date   Sat, 5 Oct 2013 10:22:21 +0900

Pablo Bonilla wrote:

I have a problem the following problem: I wrote a program that is
meant to remove all special Spanish accents from strings so I can have
a clean sentence to compare it with other strings. My program has the
following lines:

***************

local unos "á é í ó ú ñ Á É Í Ó Ú Ñ ü"

[omitted]

However it is not replacing the accents because, when I looked at the
trace, Stata is understanding something totally different. Like this:

***********************

      - local unos "á é í ó ú ñ Á É Í Ó Ú Ñ ü"

[omitted]

************************

As you can see Stata reads “á”  instead of “á” and so on. Do you have
any idea why it is happening? And, more importan, do you know how to
solve it ?

--------------------------------------------------------------------------------

You accidentally saved the do-file in UTF-8 format.  To fix the problem, open the do-file in a text editor (for example, Notepad, if you're using Windows), and then save it in ANSI.*  The do-file will now be read properly by Stata.

Joseph Coveney

*In Notepad, you'll see the "Encoding" drop-down list just to the left of the "Save" button in the "Save As" pop-up screen.  Be sure that the "Encoding" has "ANSI" (and not "UTF-8") when saving.


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index