mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 02:14:13 +00:00
Can't use ${field_name} if it contains UTF-8 characters also encodeable as Latin-1 (#1363)
* unit-test data * docgen * windows unit-test accommodations
This commit is contained in:
parent
9d1d2e07ca
commit
2107d520fa
24 changed files with 46 additions and 8 deletions
|
|
@ -3470,5 +3470,5 @@ MILLER(1) MILLER(1)
|
|||
|
||||
|
||||
|
||||
2023-08-19 MILLER(1)
|
||||
2023-08-20 MILLER(1)
|
||||
</pre>
|
||||
|
|
|
|||
|
|
@ -3449,4 +3449,4 @@ MILLER(1) MILLER(1)
|
|||
|
||||
|
||||
|
||||
2023-08-19 MILLER(1)
|
||||
2023-08-20 MILLER(1)
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ import (
|
|||
const (
|
||||
NoState = -1
|
||||
NumStates = 336
|
||||
NumSymbols = 652
|
||||
NumSymbols = 653
|
||||
)
|
||||
|
||||
type Lexer struct {
|
||||
|
|
@ -779,6 +779,7 @@ Lexer symbols:
|
|||
647: 'A'-'Z'
|
||||
648: 'a'-'z'
|
||||
649: '0'-'9'
|
||||
650: \u0100-\U0010ffff
|
||||
651: .
|
||||
650: \u00a0-\u00ff
|
||||
651: \u0100-\U0010ffff
|
||||
652: .
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1500,6 +1500,8 @@ var TransTab = TransitionTable{
|
|||
return 159
|
||||
case r == 126: // ['~','~']
|
||||
return 159
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 159
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 159
|
||||
}
|
||||
|
|
@ -1840,6 +1842,8 @@ var TransTab = TransitionTable{
|
|||
return 184
|
||||
case r == 126: // ['~','~']
|
||||
return 184
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 184
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 184
|
||||
}
|
||||
|
|
@ -3144,6 +3148,8 @@ var TransTab = TransitionTable{
|
|||
return 239
|
||||
case r == 126: // ['~','~']
|
||||
return 159
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 159
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 159
|
||||
}
|
||||
|
|
@ -3444,6 +3450,8 @@ var TransTab = TransitionTable{
|
|||
return 254
|
||||
case r == 126: // ['~','~']
|
||||
return 184
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 184
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 184
|
||||
}
|
||||
|
|
@ -4604,6 +4612,8 @@ var TransTab = TransitionTable{
|
|||
return 239
|
||||
case r == 126: // ['~','~']
|
||||
return 159
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 159
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 159
|
||||
}
|
||||
|
|
@ -4792,6 +4802,8 @@ var TransTab = TransitionTable{
|
|||
return 254
|
||||
case r == 126: // ['~','~']
|
||||
return 184
|
||||
case 160 <= r && r <= 255: // [\u00a0,\u00ff]
|
||||
return 184
|
||||
case 256 <= r && r <= 1114111: // [\u0100,\U0010ffff]
|
||||
return 184
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,6 +271,7 @@ _braced_char
|
|||
| ':' | ';' | '<' | '=' | '>' | '?' | '@' | '['
|
||||
| ']' | '^' | '_' | '`' | '|' | '~'
|
||||
| ( '\\' '{' ) | ( '\\' '}' )
|
||||
| '\u00a0'-'\u00ff'
|
||||
| '\u0100'-'\U0010FFFF'
|
||||
;
|
||||
braced_field_name: '$' '{' _braced_char { _braced_char } '}' ;
|
||||
|
|
|
|||
|
|
@ -3449,4 +3449,4 @@ MILLER(1) MILLER(1)
|
|||
|
||||
|
||||
|
||||
2023-08-19 MILLER(1)
|
||||
2023-08-20 MILLER(1)
|
||||
|
|
|
|||
|
|
@ -2,12 +2,12 @@
|
|||
.\" Title: mlr
|
||||
.\" Author: [see the "AUTHOR" section]
|
||||
.\" Generator: ./mkman.rb
|
||||
.\" Date: 2023-08-19
|
||||
.\" Date: 2023-08-20
|
||||
.\" Manual: \ \&
|
||||
.\" Source: \ \&
|
||||
.\" Language: English
|
||||
.\"
|
||||
.TH "MILLER" "1" "2023-08-19" "\ \&" "\ \&"
|
||||
.TH "MILLER" "1" "2023-08-20" "\ \&" "\ \&"
|
||||
.\" -----------------------------------------------------------------
|
||||
.\" * Portability definitions
|
||||
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
|
|
|||
1
test/cases/dsl-utf8-field-names/0001/cmd
Normal file
1
test/cases/dsl-utf8-field-names/0001/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --c2p filter -f ${CASEDIR}/mlr test/input/datos-plurilingües.csv
|
||||
0
test/cases/dsl-utf8-field-names/0001/experr
Normal file
0
test/cases/dsl-utf8-field-names/0001/experr
Normal file
3
test/cases/dsl-utf8-field-names/0001/expout
Normal file
3
test/cases/dsl-utf8-field-names/0001/expout
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
año ποσότητα
|
||||
2021 130
|
||||
2022 145
|
||||
1
test/cases/dsl-utf8-field-names/0001/mlr
Normal file
1
test/cases/dsl-utf8-field-names/0001/mlr
Normal file
|
|
@ -0,0 +1 @@
|
|||
$año > 2020
|
||||
1
test/cases/dsl-utf8-field-names/0002/cmd
Normal file
1
test/cases/dsl-utf8-field-names/0002/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --c2p filter -f ${CASEDIR}/mlr test/input/datos-plurilingües.csv
|
||||
0
test/cases/dsl-utf8-field-names/0002/experr
Normal file
0
test/cases/dsl-utf8-field-names/0002/experr
Normal file
3
test/cases/dsl-utf8-field-names/0002/expout
Normal file
3
test/cases/dsl-utf8-field-names/0002/expout
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
año ποσότητα
|
||||
2021 130
|
||||
2022 145
|
||||
1
test/cases/dsl-utf8-field-names/0002/mlr
Normal file
1
test/cases/dsl-utf8-field-names/0002/mlr
Normal file
|
|
@ -0,0 +1 @@
|
|||
${año} > 2020
|
||||
1
test/cases/dsl-utf8-field-names/0003/cmd
Normal file
1
test/cases/dsl-utf8-field-names/0003/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --c2p filter -f ${CASEDIR}/mlr test/input/datos-plurilingües.csv
|
||||
0
test/cases/dsl-utf8-field-names/0003/experr
Normal file
0
test/cases/dsl-utf8-field-names/0003/experr
Normal file
3
test/cases/dsl-utf8-field-names/0003/expout
Normal file
3
test/cases/dsl-utf8-field-names/0003/expout
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
año ποσότητα
|
||||
2021 130
|
||||
2022 145
|
||||
1
test/cases/dsl-utf8-field-names/0003/mlr
Normal file
1
test/cases/dsl-utf8-field-names/0003/mlr
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ποσότητα > 100
|
||||
1
test/cases/dsl-utf8-field-names/0004/cmd
Normal file
1
test/cases/dsl-utf8-field-names/0004/cmd
Normal file
|
|
@ -0,0 +1 @@
|
|||
mlr --c2p filter -f ${CASEDIR}/mlr test/input/datos-plurilingües.csv
|
||||
0
test/cases/dsl-utf8-field-names/0004/experr
Normal file
0
test/cases/dsl-utf8-field-names/0004/experr
Normal file
3
test/cases/dsl-utf8-field-names/0004/expout
Normal file
3
test/cases/dsl-utf8-field-names/0004/expout
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
año ποσότητα
|
||||
2021 130
|
||||
2022 145
|
||||
1
test/cases/dsl-utf8-field-names/0004/mlr
Normal file
1
test/cases/dsl-utf8-field-names/0004/mlr
Normal file
|
|
@ -0,0 +1 @@
|
|||
${ποσότητα} > 100
|
||||
4
test/input/datos-plurilingües.csv
Normal file
4
test/input/datos-plurilingües.csv
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
año,ποσότητα
|
||||
2020,100
|
||||
2021,130
|
||||
2022,145
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue