Skip to content

Commit

Permalink
Change encode EUC-JP to UTF-8
Browse files Browse the repository at this point in the history
After testing Racc as per the instructions in README.ja.rdoc, I noticed the following failures:

```
❯ racc -ocalc.rb sample/calc-ja.y
❯ ruby calc.rb
calc.rb: calc.rb:197: invalid multibyte char (UTF-8) (SyntaxError)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:197: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
calc.rb:198: invalid multibyte char (UTF-8)
```
  • Loading branch information
ydah committed Apr 30, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 0c0f585 commit 017a46e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sample/calc-ja.y
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#
#
# A simple calculator, version 2.
# This file contains Japanese characters (encoding=EUC-JP).
# This file contains Japanese characters.

class Calculator2
prechigh
@@ -51,8 +51,8 @@ end
---- footer
puts '超豪華電卓 2 号機'
puts 'Q で終了します'
puts '超豪華電卓 2 号機'
puts 'Q で終了します'
calc = Calculator2.new
while true
print '>>> '; $stdout.flush

0 comments on commit 017a46e

Please sign in to comment.