escapedCharacters.yml
2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
test: outside double quotes
yaml: |
\0 \ \a \b \n
php: |
"\\0 \\ \\a \\b \\n"
---
test: null
yaml: |
"\0"
php: |
"\x00"
---
test: bell
yaml: |
"\a"
php: |
"\x07"
---
test: backspace
yaml: |
"\b"
php: |
"\x08"
---
test: horizontal tab (1)
yaml: |
"\t"
php: |
"\x09"
---
test: horizontal tab (2)
yaml: |
"\ "
php: |
"\x09"
---
test: line feed
yaml: |
"\n"
php: |
"\x0a"
---
test: vertical tab
yaml: |
"\v"
php: |
"\x0b"
---
test: form feed
yaml: |
"\f"
php: |
"\x0c"
---
test: carriage return
yaml: |
"\r"
php: |
"\x0d"
---
test: escape
yaml: |
"\e"
php: |
"\x1b"
---
test: space
yaml: |
"\ "
php: |
"\x20"
---
test: slash
yaml: |
"\/"
php: |
"\x2f"
---
test: backslash
yaml: |
"\\"
php: |
"\\"
---
test: Unicode next line
yaml: |
"\N"
php: |
"\xc2\x85"
---
test: Unicode non-breaking space
yaml: |
"\_"
php: |
"\xc2\xa0"
---
test: Unicode line separator
yaml: |
"\L"
php: |
"\xe2\x80\xa8"
---
test: Unicode paragraph separator
yaml: |
"\P"
php: |
"\xe2\x80\xa9"
---
test: Escaped 8-bit Unicode
yaml: |
"\x42"
php: |
"B"
---
test: Escaped 16-bit Unicode
yaml: |
"\u20ac"
php: |
"\xe2\x82\xac"
---
test: Escaped 32-bit Unicode
yaml: |
"\U00000043"
php: |
"C"
---
test: Example 5.13 Escaped Characters
note: |
Currently throws an error parsing first line. Maybe Symfony Yaml doesn't support
continuation of string across multiple lines? Keeping test here but disabled.
todo: true
yaml: |
"Fun with \\
\" \a \b \e \f \
\n \r \t \v \0 \
\ \_ \N \L \P \
\x41 \u0041 \U00000041"
php: |
"Fun with \x5C\n\x22 \x07 \x08 \x1B \x0C\n\x0A \x0D \x09 \x0B \x00\n\x20 \xA0 \x85 \xe2\x80\xa8 \xe2\x80\xa9\nA A A"
---
test: Double quotes with a line feed
yaml: |
{ double: "some value\n \"some quoted string\" and 'some single quotes one'" }
php: |
array(
'double' => "some value\n \"some quoted string\" and 'some single quotes one'"
)
---
test: Backslashes
yaml: |
{ single: 'foo\Var', no-quotes: foo\Var, double: "foo\\Var" }
php: |
array(
'single' => 'foo\Var', 'no-quotes' => 'foo\Var', 'double' => 'foo\Var'
)