Delphi 6 to Delphi 2010 character codes conversion

I an converting a unit from Delphi 6 to Delphi 2010.  Everything works except for a couple of character codes, the decimal values are(224 and 227).  As far as I can tell when data is loaded from the socket into a buffer, the codes are ok.  When they are written to another buffer these 2 codes use the upper case version of the characters(192 and 224).  I don' t see it on any other of the codes.  I set the code page in the compiler options to 1252, but that did not work.  Any other options I can set in Delp
hi 2010 to correct this?

TIA
0
Jan
3/19/2013 12:30:19 PM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

4 Replies
1370 Views

Similar Articles

[PageSpeed] 42

Jan B wrote:

> I an converting a unit from Delphi 6 to Delphi 2010.  Everything
> works except for a couple of character codes, the decimal values
> are(224 and 227).  As far as I can tell when data is loaded from the
> socket into a buffer, the codes are ok.  When they are written to
> another buffer these 2 codes use the upper case version of the
> characters(192 and 224).  

Sounds like a ANSI -> Unicode conversion issue. How are your buffers
declared?

The ANSI code pages have different glyphs at the code points above
#127, depending on the code page. If the computer the characters come
from uses  a different codepage from the computer receiving said
characters you will see differences between what was sent and what is
displayed on the receiver side.

-- 
Peter Below (TeamB)
0
Peter
3/19/2013 6:21:42 PM
Peter:

They are a char in Delphi 6 , but I changed them to AnsiChar, for Delphi 2010.  The sending computer is a mainframe 3270 or 5250. 

TIA


> {quote:title=Peter Below wrote:}{quote}
> Jan B wrote:
> 
> > I an converting a unit from Delphi 6 to Delphi 2010.  Everything
> > works except for a couple of character codes, the decimal values
> > are(224 and 227).  As far as I can tell when data is loaded from the
> > socket into a buffer, the codes are ok.  When they are written to
> > another buffer these 2 codes use the upper case version of the
> > characters(192 and 224).  
> 
> Sounds like a ANSI -> Unicode conversion issue. How are your buffers
> declared?
> 
> The ANSI code pages have different glyphs at the code points above
> #127, depending on the code page. If the computer the characters come
> from uses  a different codepage from the computer receiving said
> characters you will see differences between what was sent and what is
> displayed on the receiver side.
> 
> -- 
> Peter Below (TeamB)

Edited by: Jan B on Mar 19, 2013 5:43 PM
0
Jan
3/20/2013 12:44:34 AM
Jan B wrote:

> 
> They are a char in Delphi 6 , but I changed them to AnsiChar, for
> Delphi 2010.  The sending computer is a mainframe 3270 or 5250.
> 

You will have a ANSI -> Unicode conversion when you try to display the
content of the buffer, or assign it to a variable of type string. The
automatic conversion uses the computer's ANSI codepage.

Is the mainframe perhaps sending characters in the EBCDIC encoding, not
ANSI? That would complicate matters further...

-- 
Peter Below (TeamB)
0
Peter
3/20/2013 5:58:52 PM
> {quote:title=Peter Below wrote:}{quote}
> Jan B wrote:
> 
> > 
> > They are a char in Delphi 6 , but I changed them to AnsiChar, for
> > Delphi 2010.  The sending computer is a mainframe 3270 or 5250.
> > 
> 
> You will have a ANSI -> Unicode conversion when you try to display the
> content of the buffer, or assign it to a variable of type string. The
> automatic conversion uses the computer's ANSI codepage.
> 
> Is the mainframe perhaps sending characters in the EBCDIC encoding, not
> ANSI? That would complicate matters further...
> 
> -- 
> Peter Below (TeamB)


Peter:

That fixed it.

Thanks
0
Jan
3/22/2013 1:33:43 AM
Reply:

Similar Artilces:

from delphi 6 to delphi 2010
Hi. It is possible, with component RX, dxforumlibrary, InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. Thank by comments. excequiel arostica wrote: >Hi. > It is possible, with component RX, dxforumlibrary, >InfoPower3000Pro, StringAlignGrid. Accepts communication BDE. > >Thank by comments. Rx is dead and sources are taken over by jcl/jvcl. I dont know about the rest of the components and i have no experiences with bde over the last 9 years. excequiel arostica wrote: > Hi. > It is possible, with component RX, dxforumlibrary,...

delphi 2006 code in delphi 2010
hello, is there any option to make delphi 2006 code work in delphi 2010? something like in java IDEs where you can define the code level you like to use? the problem is, that i made a project with 2006 and sent it to my customer. they got 2010 and it compiles fine, but it just doesn't work. it deals with en-/decryption of text, we assumed, that it has something to do with ansi vs. unicode strings... but we cant find the exact position where the error occurs. i am a bit dissapointed, because everywhere i read that the new IDE will always be downwards compatible and so on.. but in ...

Delphi 5 to Delphi 6 conversion
Hi We are moving our product from D5 to D6. I have dealt with all the deprecated functions. However, we are getting various platform specifc warnings. These include: Symbol 'FileGetAttr' is specific to a platform Symbol 'FileSetAttr' is specific to a platform Symbol 'faReadOnly' is specific to a platform We want this conversion to be carried out correctly. We don't view the simple solution of switching off those warnings or symbols as being the correct way. What we want is the same platform independence as other functions. For example, all o...

package conversion from Delphi 5 to Delphi 2010
Hello, I am evaluating 2010 to convert a delphi 5 app up. My first task is to convert some custom control packages. My requires statment looks like this: requires vcl50, Vclx50, VclSmp50, Vcldb50, vcljpg50, What are the delphi 2010 equivalents if any? Is there documentation that I could look at to help with the conversion process? Thanks.. ...Joe.. joe alaimo wrote: > requires > vcl50, > Vclx50, > VclSmp50, > Vcldb50, > vcljpg50, 140 is the 2010 version. > > What are the delphi 2010 equivalents if any? Is t...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

Delphi 6 and Delphi 2010 Install same machine
I'm currently still on Delphi 6 for some legacy software, but I'm looking at installing Delphi 2010 on my Windows XP machine. Are there any known issues with installing D2010 on an XP machine that already has Delphi 6 installed? (I'm not talking about updating the projects code/controls/etc, just running the IDE's). > I'm currently still on Delphi 6 for some legacy software, but I'm > looking at installing Delphi 2010 on my Windows XP machine. > > Are there any known issues with installing D2010 on an XP machine that > already has Delphi 6 i...

Calling Delphi 6 DLL from Delphi 2010
We have a Delphi 6 dll that has a PChar passed to it. The dll function then does a search and returns a PCHar. This works good using Delphi 6 to call and recieve the dll result. We have upgraded our calling program to Delphi 2010 and most of the time, the value is passed back just fine. However, we do have times when we get an access violation, when calling the dll. The dll does process the request. Below is the code. Has anyone had a similar issue using an older version Delphi Dll with Delphi 2010? I am sure that Unicode has something to do with it, but not sure how to fix th...

Is it worth to move my code from Delphi 2009 to Delphi 2010?
Hi guys, we are working on Delphi 2009 till this day because we do not have the time to upgrade our code to the newest version. There is always something more important (features, bugs...) and our code has 2+ million lines. I thought that instead of moving from D2009 to XE7 I could atleast move code to D2010 because it is more or less backward compatible and it shouldn't take me that much of a work. I wanted to ask you about your opinion. Is it a good version to move to? Regards. Dimitrij wrote: > I thought that instead of moving from D2009 to XE7 I could atleast > move ...

Code works in Delphi 7 but not in Delphi 2010 [Edit]
hello, i have a procedure that open's a file by passing the file name as the parameter to the executable. something like this {code} C : \ P r o g r a m F i l e s \ Da c k e r \ D r a c k e r . e x e " G : \ D E l p h i 7 \ D e l p h i 7 A p p _ l o g . t " {code} The source code is {code} procedure OpenFileWithExe var hReg: HKEY; Ret: Longint; RegDataType, RegDataSize: DWORD; CmdLine: array [0..560] of Char; Len: Integer; SInfo: TStartupInfo; PInfo: TProcessInformation; begin Ret := windows.RegOpenKeyEx(HKEY_CURRENT_USER, ...

Change icon after migrating from Delphi 6 to Delphi 2010
I have an old project I am moving to Delphi 2010. I have attempted to change the icon for this project by setting the Application icon in the Project Options. After building the project, the exe file shows the new icon. However, when I create a shortcut to my application, the icon is the old Delphi lightning bolt icon. I have tried to get rid of the old icon by completely deleting the RES file and letting Delphi create a new RES file but that didn't change anything. I know I am missing something but I can't seem to find it. Help! RG Robert Gutierrez wrote: > I have a...

Upgrad to Delphi 2010 Enterprise from Delphi 6 Enterprise
Hi, Is it possible to use the upgrade offer when upgrading to "Delphi 2010 Enterprise" from "Delphi 6 Enterprise" ? I can find a lot of different examples on upgrades.... but not this one ;-( Why is the price in the Nordic region higher than if I was buying in US? (40% off....) I've tried to registre my "Delphi 6" in order to reveive the Promo offer key, but I can't registre. Why is this ? Best regards Nils Unfortunately Embarcadero has changed the upgrading rules since February 1st. You can see it at http://www.embarcadero.com/upgrade...

Delphi XE / Delphi 2010
Hello! I noticed that Embarcadero® Delphi® 2010 Version is not on the list of products on Embarcadero page. Or is it still possible to buy it? Will RAD Studio XE compile programs written in Delphi 2010 without problems.? Thanks. Am 13.09.2010 09:04, schrieb Petra Nemec: > Will RAD Studio XE compile programs written in Delphi 2010 without problems.? As always you will probably have to recreate the projects as the import is still a bit -- special. Christian Hello! Does anybody know if it is still possible to get a Delphi2010 trial version (if yes where)? ...

Delphi 5 to Delphi 6 and up
Dear List, Trying to add 7Zip compression support to my delphi application. I am using the ported 7Zip sdk (see their website, they have a link). I am stumped on how to rewrite a single function: function ReverseDecode(var Models: array of SmallInt; ....): ..... where the input is mostly a fixed size array of SmallInt. This code perfectly compiles and functions in Delphi 6 and up, but in Delphi 5 I get the error: There is no overloaded version of 'ReverseDecode' that can be called with these arguments And obviously, the input (fixed) isn't the same as the param de...

SEPA components for Delphi with Source Code (Delphi 5
Hi all, in the european union change next year the Bankingformat to the SEPA Format. All peoples and companies must change the bankingssoftware and the costumer data form acountnummers in the new IBAN and BIC numbers. See: http://www.arma-it.de/shop/artikelueber.php?wgruppeid=211&wgruppe_offen=211 Functions: - generate SEPA XML'S - Calc IBAN - BIC Database (DE,AT and CH) Questions: vertrieb@arma-it.de PS: Bankinssoftware for Develpoers (Germany only) http://www.arma-it.de/shop/artikelueber.php?wgruppeid=212&wgruppe_offen=212 El 26/10/13 21:38, A...

Web resources about - Delphi 6 to Delphi 2010 character codes conversion - embarcadero.delphi.general

Gene conversion - Wikipedia, the free encyclopedia
Gene conversion is the process by which one DNA sequence replaces a homologous sequence such that the sequences become identical after the conversion ...

Sonny Bill Williams' transformation due to conversion to Islam, Anthony Mundine says
He went from being savaged for walking out on the Bulldogs to becoming one of the world's most respected rugby union stars. Anthony Mundine believes ...

Family of Enrique Marquez unaware of his 2014 marriage, conversion to Islam
The family members of Enrique Marquez, the man linked to the San Bernardino massacre, said they were unaware he was married or that he had converted ...

Christmas Verse: A tale of conversion or, as Christians view it, re-birth
The Journey of the Magi, T. S. Eliot 'A cold coming we had of it, Just the worst time of the year For a journey, and such a long journey: The ...

Revisiting Carlos Martinez's rotation conversion
... thanks to his pitch mix, then it sure sounded like it could be possible. Now, almost a full year later, I wanted to revisit Martinez's conversion. ...

Dow to Force Conversion of Buffett Preferreds If Rally Holds
Bloomberg Dow to Force Conversion of Buffett Preferreds If Rally Holds Bloomberg Dow Chemical Co., which has been paying $255 million annually ...

​Judge orders N.J. "gay conversion" nonprofit to close
Jews Offering New Alternatives for Healing, known as JONAH, ordered to cease operations within 30 days

Council votes to ban gay 'conversion' therapy in Cincinnati
Cincinnati follows four states and the District of Columbia banning the therapy, becoming the first city outside D.C. to do so.

Roth IRA conversion is complicated
Tax rules governing IRAs are complex and ever changing, so if you're considering a Roth conversion, do some legwork first.

Del Rio explains why Raiders went for late two-point conversion
... A's Sharks Warriors Kings 49ers Raiders Quakes Insiders More Tickets Shop Watch Del Rio explains why Raiders went for late two-point conversion ...

Resources last updated: 12/26/2015 1:10:41 PM