Comments (7)
@vbrazo At time of reporting it Faker was unable to handle UTF-8 letters, even by converting them to ASCII.
I see no reason to close this unless this issue is now fixed.
from faker.
I am using following fix in my script:
class Faker::InternetPL < Faker::Internet
def self.user_name(name)
changes = {
"ą" => "a",
"Ą" => "A",
"ć" => "c",
"Ć" => "C",
"ę" => "e",
"Ę" => "E",
"ł" => "l",
"Ł" => "L",
"ń" => "n",
"Ń" => "N",
"ó" => "o",
"Ó" => "O",
"ś" => "s",
"Ś" => "S",
"ź" => "z",
"Ź" => "Z",
"ż" => "z",
"Ż" => "Z",
}
changes.each do |old, new|
name = name.gsub(old, new)
end
return super(name)
end
end
from faker.
Note for someone willing to fix this: maybe stringex does the trick
from faker.
It seems that Polish is not listed below "Currently, built-in translations are available for the following languages:".
from faker.
@matkoniecz could we close this issue or you guys need help to solve it?
from faker.
@matkoniecz ok cool! Thanks for the quick follow-up. I'm going to take a look at this issue in the next days. Lemme know if you have any new ideas on how to solve it.
from faker.
As I reread it - I would expect Faker to just handle UTF-8 text.
Originally mentioned conversion to ASCII is an overcomplicated crutch that should not be necessary.
from faker.
Related Issues (20)
- Improve testing of locales files HOT 2
- New generator request: Faker::Company.indian_gst_number HOT 3
- Outdated country names and inconsistencies in en/address.yml HOT 5
- Add benchmarking to faker-ruby HOT 6
- Deprecate Generators with External Calls HOT 3
- Fix/Deprecate `FmaBrotherhood` Generator HOT 2
- Reproducing "Faker::Base#regexify does not work with non-capturing groups or + repeat operator" on v 3.2.1 HOT 2
- `Faker::Time.backward (.forward)` may generate time which is greater (less) than the current time HOT 4
- Fix flaky spec on `TestFakerFile#test_file_name` HOT 6
- Translation missing | en.faker.company.indian_gst_number HOT 6
- Consistent addresses HOT 3
- Drop support for Ruby 2.7 HOT 8
- Invalid GB phone number from `Faker::PhoneNumber.phone_number` HOT 3
- Fake Zip Codes HOT 6
- v3.2.3 correct? HOT 9
- Faker 3.3.0 generating invalid phone numbers HOT 8
- Invalid Timezone: Atlantic/Cabo_Verde HOT 1
- Random Test Failure: Faker::Omniauth tests fail when generating a name with an apostrophe HOT 8
- Add option to silence deprecation warnings when running the tests HOT 4
- Add id method to Faker::Internet module HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from faker.