Comments (6)
Are you using an older version of qf/n?
I think we very explicity transmit in iso-8859-1
(latin1
) which is the protocol standard:
~/dev/quickfixn/QuickFIXn$ cat CharEncoding.cs; grep -A5 " Send(" SocketReader.cs SocketInitiatorThread.cs
namespace QuickFix
{
public static class CharEncoding
{
public static System.Text.Encoding DefaultEncoding;
static CharEncoding()
{
DefaultEncoding = System.Text.Encoding.GetEncoding("iso-8859-1");
}
}
}
SocketReader.cs: public int Send(string data)
SocketReader.cs- {
SocketReader.cs- byte[] rawData = CharEncoding.DefaultEncoding.GetBytes(data);
SocketReader.cs- stream_.Write(rawData, 0, rawData.Length);
SocketReader.cs- return rawData.Length;
SocketReader.cs- }
--
SocketInitiatorThread.cs: public bool Send(string data)
SocketInitiatorThread.cs- {
SocketInitiatorThread.cs- byte[] rawData = CharEncoding.DefaultEncoding.GetBytes(data);
SocketInitiatorThread.cs- stream_.Write(rawData, 0, rawData.Length);
SocketInitiatorThread.cs- return true;
SocketInitiatorThread.cs- }
from quickfixn.
I want the encoding to be taken out to the settings. This will make quick fix more flexible.
"ISO-8859-1" is a standard for English-speaking people. My broker uses win1251 by default and I get a crooked text display and then I have to recode the iso-8859-1 - >win1251, which consumes computing resources.
Now I have edited win1251 encoding in the Char Encoding.cs file and everything has worked for me. Example:
public static class CharEncoding
{
public static System.Text.Encoding Default Encoding;
static Char Encoding()
{
////Default Encoding = System.Text.Encoding.GetEncoding("iso-8859-1");
Default Encoding = System.Text.Encoding.GetEncoding(1251);
}
}
- Default Encoding = System.Text.Encoding.GetEncoding("iso-8859-1");
- (right) Default Encoding = System.Text.Encoding.GetEncoding(1251);
from quickfixn.
I wouldn't be opposed to exposing it as a SessionSetting. Although the FIX Protocol standard requires latin1, many firms (including very large ones) obviously do not adhere to it.
from quickfixn.
Related Issues (20)
- The documentation website is down HOT 4
- minor DD issue: 965 SecurityStat in FIX50
- ValidateFieldsOutOfOrder=N not working HOT 1
- [Bug] Direct 0.0.0.0 address binding
- Message Parser and .NET 5.0 HOT 20
- just cannot build successfully for a custom message xml file. HOT 2
- Slow parsing of updated dictionary
- N
- I have to work with version FIXT.1.1 HOT 2
- FIX 5.0 doesn't crack login, logout, heartbeat HOT 3
- Can you to do Message.FromString as virtual?
- How to install QuickFix/n (Tutorial for Beginners) ? HOT 6
- LegSettlType defined as char but should be string (Tag 587) HOT 1
- FIX acceptor creates a lot of empty files
- How to send a fix recovery U2 request using this library? HOT 2
- [Question/Improvements] Log HttpListenerException in HttpServer.cs ConnectionThreadStart method
- Bind SocketInitiator to specific host/port HOT 4
- MarketDataRequestReject requires MDReqRejReason eventhough DataDictionary is set to required='N' HOT 2
- Nuget Package ? 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 quickfixn.