Same text but look different in different ide? - encode

I have text '01 - Má Lủng A' in excel and i copy to sql developer or read file excel and insert to oracle db, it became '01 - Ma' Lu'ng A'
when i copy it to compare string by javascript '01 - Má Lủng A' == '01 - Má Lủng A'(1st copied, 2nd typed)
it return false :|

Related

q/kdb+ new version 4.0 parse error reading large tables from previous version

Is there any solution other than saving as csv and reloading in the new version...
KDB+ 4.0 2020.05.04 Copyright (C) 1993-2020 Kx Systems
m64/ 8(16)core 32768MB georgelovas ... 127.0.0.1 EXPIRE 2020.08.26
'parse `:../marketdata/tx
[0] (.Q.l)
With the old version...
KDB+ 3.6 2019.08.20 Copyright (C) 1993-2019 Kx Systems
m64/ 8(16)core 32768MB ... 127.0.0.1 EXPIRE 2020.08.26
q)count tx
2521171492
q)
Table info...
q)meta tx
c | t f a
------| -----
DATE | d
TICKER| s
FIELD | s
VALUE | f
q)t
DATE TICKER FIELD VALUE
-------------------------------------------------------------------
1998.01.31 XXXXXXX INDEX FIELD_1 -881
1998.01.31 XXXXXXX INDEX FIELD_2 -604
1998.01.31 XXXXXXX INDEX FIELS_3 0
1998.01.31 XXXXXXX INDEX FIElD_4 1.998031e+07
1998.02.28 XXXXXXX INDEX FIELD_1 -544
1998.02.28 XXXXXXX INDEX FIELD_2 -475
1998.02.28 XXXXXXX INDEX FIELS_3 0
1998.02.28 XXXXXXX INDEX FIElD_4 1.998041e+07
I see you are using:
KDB+ 4.0 2020.05.04
After reading the release notes, in the 2020.06.18 version there was a bug fix where reading an object exceeding 2GB in serialized form as part of a compound object from a single file was throwing a parse error since 3.7t 2019.10.22. Your version that works is 3.6. So this may be the answer to your problem.
Have you tried using \l from within a q session to load the table ?
The error your output seems to be showing is when loading the data from the command line.
Can you give more information on what the table consists of, meta etc.?
We may need more information around the table meta to replicate.
Can you tell us what the tx looks like?

How to force Delphi's TADOConnection use ansistring for Command?

I have problem with encoding when I insert into dbf file through ADO.
Connecting string: 'Provider=Microsoft.Jet.OLEDB.4.0;Extended Properties="dBASE IV";Data Source='+extractfilepath(ParamStr(0))+';'+
'User ID=Admin;Password='
In a insert command i'm converting data to certain codepage but in table are landing different bytes. Probably because of unicode strings.
insert into someDBFFile (f1,f2,f3,f4,f5)
values(
'ATENEUM SPŁśKA Z OGRANICZONŹ ODPOWIEDZIALNOCIŹ S.K.A. Wpisana w S†dz',
'ie rej.dla Krakowa-r˘dmiežcie Wydzia’ XI Gospodarczy',
'30-741',
'Krak˘w',
'Nad Drwin† 10, '
)
Data after insert into DBF:
ATENEUM SPťKA Z OGRANICZONŤ ODPOWIEDZIALNO?CIŤ S.K.A. Wpisana w SĹdzie rej.dla Krakowa-?rôdmie§cie Wydzia' XI Gospodarczy
30-741Krakôw
Nad DrwinĹ 10,
Should be as in sample code:
'ATENEUM SPŁśKA Z OGRANICZONŹ ODPOWIEDZIALNOCIŹ S.K.A. Wpisana w S†dz',
'ie rej.dla Krakowa-r˘dmiežcie Wydzia’ XI Gospodarczy',
'30-741',
'Krak˘w',
'Nad Drwin† 10, '
I tried TADOTable with the same result.
tblZAEX.Insert;
tblZAEX.FindField('NA1').AsAnsiString:=ToMazovia(Copy(TInvoiceHeaderPartiesSummaryB_Name.asansiString,1,70));
tblZAEX.FindField('NA2').AsAnsiString:=ToMazovia(Copy(TInvoiceHeaderPartiesSummaryB_Name.asansiString,71,70));
tblZAEX.Post;

Does GNU FORTH have an editor?

Chapter 3 of Starting FORTH says,
Now that you've made a block "current", you can list it by simply typing the word L. Unlike LIST, L does not want to be proceeded by a block number; instead it lists the current block.
When I run 180 LIST, I get
Screen 180 not modified
0
...
15
ok
But when I run L, I get an error
:30: Undefined word
>>>L<<<
Backtrace:
$7F0876E99A68 throw
$7F0876EAFDE0 no.extensions
$7F0876E99D28 interpreter-notfound1
What am I doing wrong?
Yes, gForth supports an internal (BLOCK) editor. Start gforth
type: use blocked.fb (a demo page)
type: 1 load
type editor
words will show the editor words,
s b n bx nx qx dl il f y r d i t 'par 'line 'rest c a m ok
type 0 l to list screen 0 which describes the editor,
Screen 0 not modified
0 \\ some comments on this simple editor 29aug95py
1 m marks current position a goes to marked position
2 c moves cursor by n chars t goes to line n and inserts
3 i inserts d deletes marked area
4 r replaces marked area f search and mark
5 il insert a line dl delete a line
6 qx gives a quick index nx gives next index
7 bx gives previous index
8 n goes to next screen b goes to previous screen
9 l goes to screen n v goes to current screen
10 s searches until screen n y yank deleted string
11
12 Syntax and implementation style a la PolyFORTH
13 If you don't like it, write a block editor mode for Emacs!
14
15
ok
Creating your own block file
To create your own new block file myblocks.fb
type: use blocked.fb
type: 1 load
type editor
Then
type use myblocks.fb
1 load will show BLOCK #1 (lines 0 till 15. 16 Lines of 64 characters each)
1 t will highlight line 1
Type i this is text to [i]nsert into line 1
After the current BLOCK is edited type flush in order to write BLOCK #1 to the file myblocks.fb
For more information see, gForth Blocks
It turns out these are "Editor Commands" the book says,
For Those Whose EDITOR Doesn't Follow These Rules
The FORTH-79 Standard does not specify editor commands. Your system may use a different editor; if so, check your systems documentation
I don't believe gforth supports an internal editor at all. So L, T, I, P, F, E, D, R are all presumably unsupported.
gforth is well integrated with emacs. In my xemacs here, by default any file called *.fs is considered FORTH source. "C-h m", as usual, gives the available commands.
No, GNU Forth doesn't have an internal editor; I use Vim :)

Baffled: SPSS (2265) Unrecognized or invalid variable format

A year ago, we analyzed with SPSS 22 some data with 100+ variables on 5 lines. We used the GUI and laboriously entered variable names and output formats. This year, we are using SPSS 23 after a mandatory upgrade. We have similar data, and want to use a syntax file instead. We copied the GET DATA output from last year, made a few changes, and ran. No deal. We get the notorious and almost completely unhelpful error message in the title. (It continues "The format is invalid. For numeric formats, the width or decimals value may be invalid." Not line number, Not indication of the problem).
We are not using big numbers. We are not using macros, as in this SO question. We tried replacing F1.0 with N1. There are no ','s in the file (hence, no F3,1-like typos). I have searched the web. Does anyone know what else the problem might be?
The failing GET DATA statement, with filename and middle elided.
GET DATA /TYPE=TXT
/FILE="E: ... .txt"
/ENCODING='UTF8'
/DELCASE=VARIABLES 123
/DELIMITERS="\t"
/ARRANGEMENT=DELIMITED
/FIRSTCASE=1
/IMPORTCASE=ALL
/VARIABLES=
ID A4
Group A2
Quality A2
V4 A5
oarea F4.1
oallarea F4.1
olthmean F5.3
olthmax F5.3
...
x N1
o N1
S N1
Z N1
w N1.
F5.5 was not valid. Fixing that and program ran.

how to form fields section in xfd file

I'm having problem to form the field section's structure into xfd files after analyse by issuing commnad "vutil32.exe -i -kx pogl.dad". I hope somebody could help me out how to form out field structure as highlighted in below. I've uploaded sample of my file known as "pglc.dad" i hope soneone could guide me how to form .xfd file from his expert skills and guide me.Thanks
Result from vutil32.exe
file size: 250880
record size (min/max): 121/1024 compressed(80%)
# of keys: 4
key size: 16:02 31:03 56:03 15
key offset: 0 0 0 1
duplicates okay: N N N N
block size: 512
blocks per granule: 1
tree height: 4/2/2.7
# of nodes: 200
# of deleted nodes: 1
total node space: 101800
node space used: 67463 (66%)
user count: 0
Key Dups Seg-1 Seg-2 Seg-3 Seg-4 Seg-5 Seg-6
(sz/of) (sz/of) (sz/of) (sz/of) (sz/of) (sz/of)
0 N 1/0 15/1
1 N 1/0 15/66 15/1
2 N 1/0 40/81 15/1
3 N 15/1
Here is my further construction of .xfd file.
XFD,02,PGLC,PGLC
00300,00041,004
1,0,013,00000
01
PGSTAT
3,0,004,00004,020,00021,004,00000
3
PGSTAT
PGDESC
PGLINE
3,0,004,00004,008,00013,004,00000
03
PGSTAT
PGDESC
PGLINE
1,0,012,00021
01
PGSTAT
000
0150,00150,00003 =================>> How can i form this field section.
00000,00013,16,00016,+00,000,000,PGSTAT
00000,00001,16,00001,+00,000,000,PGDESC
00001,00015,16,00015,+00,000,000,PGLINE
here is the link for my pglc.dad : http://files.engineering.com/getfile.aspx?folder=080fdad6-b1d5-4a37-8dd0-b89f9a985c69&file=PGLC.DAD
Thanks appopriate to someone could helps.
I know the XFD format intimately as I have written a couple of parsers of this file format in both Perl and Cobol.
Having said that, I would strongly recommend that you do not try to hand craft an XFD file from scratch.
If you have an AcuCobol (MicroFocus) compiler, and the source of the file's SELECT and FD definitions, then you can create a very small Cobol program that has just the SELECT and FD definitions and then compile the program using:
ccbl32.exe -Fx <program>
That will create an XFD file for the indexed file definition. Note, you can specify a directory for the created XFD file using the -Fo <directory> option.
If you don't have the source of the file definitions, then you are just going to be guessing what and where the fields are. The indexed file by itself will not tell you that information. I can see from extracting the data in your file (using the vutil -e option) that the file contains binary data as well as text, so without knowing exactly what PICture those fields are (COMP-?) you will be struggling to figure out the structure of those fields.

Resources