Skip to content

Commit 1eaca6e

Browse files
committed
fix: force UTF-8 encoding for non-UTF8 locales
The CLI now explicitly sets UTF-8 encoding for external and internal strings to prevent encoding errors when run in environments with C/POSIX locales (e.g., Homebrew test sandboxes). Bump version to 2.3.1
1 parent 4972dc3 commit 1eaca6e

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
classifier (2.3.0)
4+
classifier (2.3.1)
55
fast-stemmer (~> 1.0)
66
matrix
77
mutex_m (~> 0.2)

exe/classifier

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
11
#!/usr/bin/env ruby
2+
# frozen_string_literal: true
3+
4+
# Force UTF-8 encoding for proper handling of model data and user input
5+
Encoding.default_external = Encoding::UTF_8
6+
Encoding.default_internal = Encoding::UTF_8
7+
28
require 'classifier/cli'
39

410
result = Classifier::CLI.new(ARGV).run

lib/classifier/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Classifier
2-
VERSION = '2.3.0'.freeze
2+
VERSION = '2.3.1'.freeze
33
end

0 commit comments

Comments
 (0)