[eluser]Unknown[/eluser]
Hi all!
I use CI and RESTful library on many projects. My db is SQL server 20008, and the field of my table where i have found the problem bugs is NVARCHAR(MAX).
I don't have the problem with other tables (collation are the same).
When i execute:
Code:
$query = $this->db->query($sql)
and try to get values
Code:
foreach($query->result() as $row){
$desc = $row->GEL_Descripcion;
}
The normal value of $row->GEL_Descripcion is a large html, but this value have other things between the content:
Code:
"GEL_Descripcion": [Normal html code]
u0000\u0000\u0000È9\u0004\u0000\u0000\u0000\u0000x9\u0004@9\u00049\u0000\u0000\u0000)\u0000\u0000\u0000ßÔ<B\b\u0000\u0000\u0000ì
9\u0004¨¶Ê\u0003\u00189\u0004\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\b9\u0004conn_id\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u00009\u0000\u0000\u00009\u0000\u0000\u0000ÁK\n\u0000\u0000\u0000$9\u0004ç6\u0004P9\u0004à
9\u0004\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000result_id\u0000\u0000\u0000\u0000\u0000\u0000\u00009\u0000\u0000\u00009\u0000\u0000\u0000\u0002T\r\u0000\u0000\u0000\\9\u00048\u00049\u0004\u00189\u0004\u0000\u0000\u0000\u00009\u0004result_array\u0000\u0000\u0000\u0000A\u0000\u0000\u00009\u0000\u0000\u0000»G&\u000e\u0000\u0000\u00009\u0004¨À8\u0004È9\u0004P9\u0004P9\u0004\u0000\u0000\u0000\u0000result_object\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000A\u0000\u0000\u0000A\u0000\u0000\u00004¾\nê\u0015\u0000\u0000\u0000Ô9\u0004øÀ8\u0004\b9\u00049\u0004\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000custom_result_object\u0000\u0000[Normal html code]
As you can see, [Normal Html code] is the correct html, but on character 4000-4200 aprox. i see these unicode characters, and if you pay attention, you can se between this unicode characters the name of some variables of DB_result class: result_array,result_object, conn_id....
I try to convert the value into Base64, utf8, bin2hex -> dec, but with no luck.
Table Structure:
Code:
GO
/****** Object: Table [dbo].[MyTable] Script Date: 07/10/2013 16:12:26 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[MyTable](
[SVL_IdLocalizacionSugerencia] [int] IDENTITY(1,1) NOT NULL,
[SVL_IdSugerencia] [int] NOT NULL,
[SVL_Idioma] [nvarchar](15) NOT NULL,
[SVL_Titulo] [nvarchar](256) NOT NULL,
[SVL_Sumario] [nvarchar](max) NOT NULL,
[GEL_Descripcion] [nvarchar](max) NOT NULL,
[SVL_ImagenListado] [nvarchar](64) NOT NULL,
[SVL_ImagenDetalle] [nvarchar](64) NOT NULL,
[SVL_Activo] [bit] NOT NULL,
[SVL_FechaInicio] [datetime] NULL,
[SVL_FechaFin] [datetime] NULL,
[SVL_Orden] [int] NOT NULL,
[SVL_TituloSeo] [nvarchar](256) NOT NULL,
[SVL_MetaDescription] [nvarchar](max) NOT NULL,
Any ideas?????
Thanks in advance