Created
November 8, 2019 08:52
-
-
Save SpiceMan/74f9cb36c42e0d86a2685d368b74ac90 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/MBPY/DB/Result/Option.pm b/lib/MBPY/DB/Result/Option.pm | |
index b3bb2d3..a766e0a 100644 | |
--- a/lib/MBPY/DB/Result/Option.pm | |
+++ b/lib/MBPY/DB/Result/Option.pm | |
@@ -157,7 +157,11 @@ sub short_name { | |
my $name = decode( "sjis", $self->name ); | |
$name =~ s/を選んで.+$//; | |
- return to_sjis($name); | |
+# 波ダッシュと全角マイナスのUTF-8=>シフトジス変換問題対策 | |
+# 参照:http://blog.livedoor.jp/sasata299/archives/51186273.html | |
+ $name =~ tr/\x{ff5e}\x{ff0d}/\x{301c}\x{2212}/; | |
+ | |
+ return encode("sjis", $name); | |
# return length $name > 8 ? to_sjis(substr($name, 0, 8) ). to_sjis("・・・") : $self->name; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment