Comments (7)
Hi @notchriss , these letters are not valid per the official syntax rules (see http://goo.gl/cSFrnv section 4 and 5), although you could use it when you specify it with whom you send/receive the message.
Sometimes I saw messages with letters with diacritics (in italian we use àòùìèé and so on) get rejected by my carrier..
We could implement an exception somehow? How? I wouldn't remove the line, at the very least instead of replacing we could transliterate with iconv... (edit: actually iconv requires to know the charset of origin...)
from edifact.
Hi @sabas, I do not think exception is a good idea, if it's a deviation from the standard.
Although it's hard to believe EDIFACT has no way to send such symbols, seeing how it's a relatively popular standard in the aviation industry, and many people's (i.e. passengers) names from different European countries do contain them. Maybe it's possible to use a different encoding agreed upon by the sender and the receiver? In this particular case I happened to be both, so I can just convert the string before sending and then convert it back to UTF8 after receiving.
from edifact.
If you act as both you can use the standards you want :-) Simply remove the line from the library (or you're using it with composer?)
from edifact.
I did remove it for now to get it working, but it's not a good long term practice. Nobody knows how long I'll maintain both or either of the servers, or where this code is going to be reused later. Standards are created for a reason, everyone and their aunties having their personal standards is not OK :) Anyway this issue can probably be closed, since apparently it's not an issue with your implementation but with EDIFACT standard itself
from edifact.
Hi, i have the same problem. I understand the standard, but in reality, not a single EDI supplier in my project (dozen of them) is encoding the data in accordance with it.. so i get all the non ASCII characters (ěščřžýáí, german umlauts etc.).
What i would like to suggest is to have the possibility to choose if this validation and character removing gets triggered.. (some boolean, setter, default can be as it is).. Because when your parser is deleting the characters, i can't use it without overriding it.. (running from Composer of course).
Again, i understand the background of this, but in my reality, there is not a single one company respecting it. So i would need to override the parse method; and check your updates for the rest of my life :/
Thanks for thinking about it..
If you decide to implement some option, please, make that warning triggering based on that option as well.
Be well.
Josef
from edifact.
Hi @jiff88 could you try with the latest version (0.0.5), I added a feature to relax this requirement in Parser.
$p = new Parser();
$p->setStripRegex("/[\x01-\x1F\x80-\xFF]/");
$p->loadString(SOMEEDIFACTSTRING);
where "/[\x01-\x1F\x80-\xFF]/" is the default regex. You can change as you wish. (I moved the NULL char stripping to the first regex)
Let me know if it works! :-)
/cc @notchriss if he's still interested
from edifact.
Oh my.. my bad! I saw that thing on 0.0.5., but i thought i should specify the VALID ranges, not the ranges that will be cut away.. and it's actually inverse, so great! I couldn't imagine i write regexp that will allow all the ranges i want, that would be huge nonsense. Thank you.
from edifact.
Related Issues (20)
- Release 0.5.0 not available via Composer HOT 2
- Possibility to have IDs instead of name as output from Interpreter::prepare HOT 5
- CDR read HOT 4
- Problems reading RFF segment from EDI-File HOT 1
- Array to string conversion, if an epty array met. HOT 1
- X12 HOT 6
- Package ramsey/array_column is abandoned HOT 2
- Trouble understanding how to get the data we need HOT 5
- Segment is ambiguous HOT 1
- Encoder double escapes values HOT 6
- Which mapping file to use? HOT 3
- UNA does not container new line character HOT 5
- Does IFTMIN:S:93A supported? HOT 5
- UTF8 characters handling in input edi file HOT 15
- How to create edi document with .edi extension for healthcare HOT 4
- readEdiSegmentDTM for SG12 HOT 5
- File has multiple messages HOT 6
- question marks are not parsed correctly HOT 5
- Fatal error on integer-value segments for Encoder HOT 2
- Reader cannot be init with a null param 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 edifact.