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 on April 23, and its replacement, is already up and running.

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

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

From   Lucas Ferreira Mation <>
Subject   st: Re: st: Re: st: Re: st: Re: st: Problems with insheet with non-standard delimiter ø
Date   Tue, 31 Jul 2012 16:34:42 -0300

. 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

On Tue, Jul 31, 2012 at 10:43 AM, daniel klein
<> 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:
> regards
> Lucas
> *
> *   For searches and help try:
> *
> *
> *

*   For searches and help try:

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