Monthly Archives: March 2006

Encoding Preamble (mystic bytes at the begining of the utf-8,utf-16,utf-7 encoded stream)

Faced a problem with detecting file encoding when file is with no encoding preamble Bytes FE and FF (0xFE,0xFF) encoded useing given encoding. The problem was that flash movie, which uses xml data source as input parameter was not able to detect the encoding of the source. (.NET web form) I’ve solved this problem by writeing the preamble in the begining of the Http Response. I think problems of this kind hapens to many programmers.

I used C# code to solve the problem:

[code lang=”cpp”]
byte[] sign=Encoding.UTF8.GetPreamble();
Response.OutputStream.Write(sign,0,sign.Length);
[/code]

Xslt Transformer Windows Application (C# .NET)

XslTransformerThis application is a very easy to use and a very small tool. It is used to transform XML file useing the given XSL file.

Application uses System.Xml, System.Xml.Xslt namespaces and their classes to perform this action.

Application requires Microsoft .NET framework to run.

Please report any bug’s or suggestions related to this easy application.

The C#.NET source code is:
[code lang=”cpp”]
try
{
if ((outputF.ShowDialog()==DialogResult.OK)&&(outputF.FileName!=null)&&(outputF.FileName.Length>0))
{
XslTransform xslt=new XslTransform();
xslt.Load(label2.Text);
xslt.Transform(label1.Text,outputF.FileName);
label3.Text=”Complete …”;
}
else
{
label3.Text=”No transformation done …”;
}
}
catch(Exception Ex)
{
label3.Text=”No transformation done …”;
MessageBox.Show(Ex.ToString());
}
[/code]

https://i0.wp.com/are.ehibou.com/wp-content/plugins/downloads-manager/img/icons/default.gif?w=625 download: XsltTransformer.zip ()
added: 30/07/2010
clicks: 351
description: Xslt Transformer binary

https://i0.wp.com/are.ehibou.com/wp-content/plugins/downloads-manager/img/icons/default.gif?w=625 download: XsltTransformerSrc.zip ()
added: 30/07/2010
clicks: 276
description: Xslt Transformer source

Totem Video Player Do Not Play DiVx AVI Movies

My totem used not to play avi movies. The problem was that

[code]sudo apt-get install totem[/code]installs totem which is based on gstreamer (totem-gstreamer). After i did

[code]sudo apt-get install totem-xine[/code](it also uninstalled totem-gstreamer) totem started to play divx avi movies. So as you see the totem setup process is easy:)