• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

BOMs in [dir]history / TAIL with Unicode

#1
BOMs (apparently) show up in the history and dirhistory after reading from a Unicode file (like a shralias sav file). Note the "?" characters below.

Code:
v:\> list /x dhtest.txt
0000 0000 ff fe 78 00 3a 00 5c 00  66 00 6f 00 6f 00 0d 00  ? x : \ f o o .
0000 0010 0a 00                                             .

v:\> dirhistory /r dhtest.txt

v:\> history /r dhtest.txt

v:\> dirhistory | tail
G:\projects
D:\PowerPro
d:\
G:\Projects\pppmem\Release
e:\Users\vefatica\Desktop
g:\Projects\pppmem
c:\
D:\tc11
V:\
?x:\foo

v:\> history | tail
type /x dhtest.txt
echo %@unicode[%@line[0,dhtest.txt]]
echo %@unicode[%@line[dhtest.txt,0]]
dirhistory
list /x dhtest.txt
dirhistory /r dhtest.txt
history /r dhtest.txt
?x:\foo
dirhistory | tail
history | tail
And the shell below was started with /U. TAIL really messes up Unicode output.

Code:
d:\tc11> dirhistory | tail
????????????????????????????????????????????????????????????????????????????????
?????????????????????????????????????????
ica\Desktop
??????????????????????????????????????????????????????
???????????????????????????
?x:\foo
?????????
v:\
??
?

v:\> echo foo | tail
foo
??
?

v:\>
 
#2
Vince Fatica:
| BOMs (apparently) show up in the history and dirhistory after
| reading from a Unicode file (like a shralias sav file). Note the
| "?" characters below.

Your example implied that the BOMs in the files were loaded into the
internal HISTORY and DIRHISTORY tables by the HISTORY/R and DIRHISTORY/R
commands. Does this happen with the other command which have similar /R
options, i.e., ALIAS, FUNCTION and SET, and their "UN" versions?

| ...
| And the shell below was started with /U. TAIL really messes up
| Unicode output.
| ...

Does TAIL mess up when you TYPE a file (e.g., executing "type file | tail"
when _unicode=1)?
--
Steve
 
#3
history / TAIL with Unicode

On Thu, 04 Mar 2010 08:08:13 -0500, Steve Fábián <> wrote:

|Vince Fatica:
|| BOMs (apparently) show up in the history and dirhistory after
|| reading from a Unicode file (like a shralias sav file). Note the
|| "?" characters below.
|
|Your example implied that the BOMs in the files were loaded into the
|internal HISTORY and DIRHISTORY tables by the HISTORY/R and DIRHISTORY/R
|commands. Does this happen with the other command which have similar /R
|options, i.e., ALIAS, FUNCTION and SET, and their "UN" versions?

Apparently not.

|| ...
|| And the shell below was started with /U. TAIL really messes up
|| Unicode output.
|| ...
|
|Does TAIL mess up when you TYPE a file (e.g., executing "type file | tail"
|when _unicode=1)?

Yes.

v:\> echo %_unicode
1

v:\> type dhtest.txt
x:\foo

v:\> type dhtest.txt | tail
x:\foo
oo



v:\>
--
- Vince
 
Top Bottom