Commit a35c5a6 1 parent 98c08ab commit a35c5a6 Copy full SHA for a35c5a6
File tree 2 files changed +16
-8
lines changed
2 files changed +16
-8
lines changed Original file line number Diff line number Diff line change @@ -56,20 +56,13 @@ public static function getBytesNumber($symbol)
56
56
$ bytesNumber = 1 ;
57
57
if ($ ascii > 0x7f ) {
58
58
switch ($ ascii & 0xf0 ) {
59
- case 0xfd :
60
- $ bytesNumber = 6 ;
61
- break ;
62
- case 0xf8 :
63
- $ bytesNumber = 5 ;
64
- break ;
65
59
case 0xf0 :
66
60
$ bytesNumber = 4 ;
67
61
break ;
68
62
case 0xe0 :
69
63
$ bytesNumber = 3 ;
70
64
break ;
71
- case 0xd1 :
72
- case 0xd0 :
65
+ case 0xc0 :
73
66
$ bytesNumber = 2 ;
74
67
break ;
75
68
}
Original file line number Diff line number Diff line change @@ -22,6 +22,21 @@ public function tearDown()
22
22
unset($ this ->encoded , $ this ->decoded );
23
23
}
24
24
25
+ /**
26
+ * Issue #8
27
+ *
28
+ * @group testing
29
+ * @see https://github.com/hidehalo/emoji/issues/8
30
+ */
31
+ public function testSpec ()
32
+ {
33
+ $ raw = "« " ;
34
+ $ encoded = $ this ->case ->encode ($ raw );
35
+ $ decoded = $ this ->case ->decode ($ encoded );
36
+ $ this ->assertSame ($ raw , $ decoded );
37
+ // $this->assertSame($raw, $encoded);
38
+ }
39
+
25
40
public function testGetPattern ()
26
41
{
27
42
$ ret = $ this ->case ->getPattern ();
You can’t perform that action at this time.
0 commit comments