Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

RE: Re: st: Re: st: Re: st: Re: st: Problems with insheet with non-standard delimiter ø


From   "David Radwin" <dradwin@mprinc.com>
To   <statalist@hsphsun2.harvard.edu>
Subject   RE: Re: st: Re: st: Re: st: Re: st: Problems with insheet with non-standard delimiter ø
Date   Tue, 31 Jul 2012 12:58:50 -0700 (PDT)

Lucas,

Here is one other idea: Google Refine.

http://www.stata.com/statalist/archive/2012-01/msg00683.html

David
--
David Radwin
Senior Research Associate
MPR Associates, Inc.
2150 Shattuck Ave., Suite 800
Berkeley, CA 94704
Phone: 510-849-4942
Fax: 510-849-0794

www.mprinc.com


> -----Original Message-----
> From: owner-statalist@hsphsun2.harvard.edu [mailto:owner-
> statalist@hsphsun2.harvard.edu] On Behalf Of Lucas Ferreira Mation
> Sent: Tuesday, July 31, 2012 12:35 PM
> To: statalist@hsphsun2.harvard.edu
> Subject: st: Re: st: Re: st: Re: st: Re: st: Problems with insheet with
> non-standard delimiter ø
>
> . insheet using "foobar.txt" ,delim(`= char(248)') clear // does not work.
>
> The problem is that insheet will not recognize the  "ø"  (`=
> char(248)') in the text. For some reason "insheet" will interpret it
> as two characters: "ø"  (  `=char(195)'  and   `=char(184)'  ) and
> the delimiters option will not accept two characters as delimiters. So
> the solution was first to replace ø with ø . Like this :
>
> . local dat_name  example_dataset.txt
> . filefilter `dat_name'.txt `dat_name'2.txt , from(`= char(195)'`=
> char(184)') to (`= char(248)')
> . insheet using `dat_name'2.txt ,delim(`= char(248)') clear
>
> this kind of works, but some lines became corrupted. I´ll try to
> export a better file in MSsql Server, with double quotes encapsulating
> text fields.
>
> again thank very much
> Lucas
>
>
> On Tue, Jul 31, 2012 at 10:43 AM, daniel klein
> <klein.daniel.81@googlemail.com> wrote:
> > Lucas,
> >
> > I copied your example from the Statalist archives. Have a look at
> > Stata's -char()- function. If you know the ASCII code of the
> > delimiter, you may code something like
> >
> > . insheet using "foobar.txt" ,delim(`= char(248)') clear
> >
> > where you replace 248 with the ASCII code. Number 248 is my guess,
> > based on the output you get from -asciiplot- (Blasnik, Juul, Cox)
> > available from the SSC.
> >
> > Also, you should update to Stata 11.2.
> >
> > Best
> > Daniel
> >
> > --
> > Dear Daniel,
> >
> > thank you for the answer. I tried on my desktop: Windows 7
> > Professional with Stata 11.1 and on a Sever with Windows Server 2003
> > and Stata 10.1. Neither works.
> >
> > it is funny how these letters keep changing.
> > In my original database and email I had the letter ř (which is printed
> > typing : ALT +155 (with the numbers keyboard part)
> > In your code bellow, at least the way I see it here,  you have used
> > the letter shown here:
> > http://unicode.org/cldr/utility/character.jsp?a=0173
> >
> > regards
> > Lucas
> >
> > *
> > *   For searches and help try:
> > *   http://www.stata.com/help.cgi?search
> > *   http://www.stata.com/support/statalist/faq
> > *   http://www.ats.ucla.edu/stat/stata/
>
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index